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

/src/wrappers/cairo/library/cairo_surface_pattern.e

http://github.com/tybor/Liberty
Specman e | 44 lines | 27 code | 8 blank | 9 comment | 2 complexity | c5c156dd83ae1e1b31ea53f0240cb634 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_SURFACE_PATTERN
23
24inherit CAIRO_PATTERN
25
26create {ANY} from_surface, from_external_pointer
27
28feature {} -- Creation
29	from_surface (a_surface: CAIRO_SURFACE)
30			-- Create a new cairo_pattern_t for the given surface.
31		require surface_not_void: a_surface /= Void
32		do
33			from_external_pointer(cairo_pattern_create_for_surface(a_surface.handle))
34			-- cairo_pattern_create_for_surface returns the newly created
35			-- cairo_pattern_t if succesful, or an error pattern in case
36			-- of no memory. The caller owns the returned object and
37			-- should call cairo_pattern_destroy() when finished with
38			-- it. This function will always return a valid pointer, but
39			-- if an error occurred the pattern status will be set to an
40			-- error.  To inspect the status of a pattern use
41			-- cairo_pattern_status().
42	end
43
44end -- class CAIRO_SURFACE_PATTERN