class CAIRO_DRAWING_AREA_IMP

(source code)

Description

Unix implementation of CAIRO_DRAWING_AREA_I

note
	description: "Unix implementation of [$source CAIRO_DRAWING_AREA_I]"

	author: "Finnian Reilly"
	copyright: "Copyright (c) 2001-2022 Finnian Reilly"
	contact: "finnian at eiffel hyphen loop dot com"

	license: "MIT license (See: en.wikipedia.org/wiki/MIT_License)"
	date: "2022-11-15 19:56:05 GMT (Tuesday 15th November 2022)"
	revision: "7"

class
	CAIRO_DRAWING_AREA_IMP

inherit
	CAIRO_DRAWING_AREA_I
		rename
			remove_clip as reset_clip,
			set_angle as rotate
		undefine
			is_initialized
		end

	CAIRO_DRAWING_CONTEXT_IMP
		rename
			make as make_cairo_context
		end

	EL_OS_IMPLEMENTATION

create
	make

feature -- Conversion

	to_buffer: EV_PIXEL_BUFFER
		local
			l_surface: CAIRO_PIXEL_SURFACE_I
		do
			create Result.make_with_size (width, height)
			create {CAIRO_PIXEL_SURFACE_IMP} l_surface.make_with_buffer (Result)
			l_surface.new_context.draw_surface (0, 0, surface)
			l_surface.adjust_colors
			l_surface.destroy
		end

end