PageRenderTime 8ms CodeModel.GetById 2ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/src/wrappers/cairo/library/cairo_linear_pattern.e

http://github.com/tybor/Liberty
Specman e | 57 lines | 26 code | 11 blank | 20 comment | 2 complexity | 7005ea49a18bd442fcfb44643c8c703f MD5 | raw file
 1note
 2	description: "."
 3	copyright: "[
 4					Copyright (C) 2007-2017: Paolo Redaelli, Cairo team
 5					
 6					This library is free software; you can redistribute it and/or
 7					modify it under the terms of the GNU Lesser General Public License
 8					as published by the Free Software Foundation; either version 2.1 of
 9					the License, or (at your option) any later version.
10					
11					This library is distributed in the hope that it will be useful, but
12					WITHOUT ANY WARRANTY; without even the implied warranty of
13					MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14					Lesser General Public License for more details.
15
16					You should have received a copy of the GNU Lesser General Public
17					License along with this library; if not, write to the Free Software
18					Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19					02110-1301 USA
20			]"
21
22class CAIRO_LINEAR_PATTERN
23
24inherit CAIRO_GRADIENT_PATTERN
25
26create {ANY} make, from_external_pointer
27
28feature {} -- Creation
29
30	make (x0,y0,x1,y1: REAL)
31			-- Create a new linear gradient along the line defined by
32			-- (x0, y0) and (x1, y1). Before using the gradient pattern,
33			-- a number of color stops should be defined using
34			-- `add_color_stop_rgb' or `add_color_stop_rgba'.
35		
36			-- Note: The coordinates here are in pattern space. For a new
37			-- pattern, pattern space is identical to user space, but the
38			-- relationship between the spaces can be changed with
39			-- `set_matrix'.
40		
41			--   x0 :      x coordinate of the start point
42			--   y0 :      y coordinate of the start point
43			--   x1 :      x coordinate of the end point
44			--   y1 :      y coordinate of the end point
45		do
46			from_external_pointer(cairo_pattern_create_linear(x0,y0,x1,y1))
47			-- cairo_pattern_create_linear returns the newly created
48			-- cairo_pattern_t if succesful, or an error pattern in case
49			-- of no memory. The caller owns the returned object and
50			-- should call cairo_pattern_destroy() when finished with
51			-- it. This function will always return a valid pointer, but
52			-- if an error occurred the pattern status will be set to an
53			-- error.  To inspect the status of a pattern use
54			-- cairo_pattern_status().
55		end
56
57end -- class CAIRO_LINEAR_PATTERN