class PIXMAP

All features

PIXMAP is DRAWABLE area like WINDOW but allow you to draw "off the screen" and the put it on the screen at any time. The pixmap is in display memory, not in the process' memory (see also IMAGE).

Direct parents

conformant parents

DRAWABLE, GRAPHIC, SENSITIVE

Summary

creation features

exported features

Details

make (width_: INTEGER, height_: INTEGER)

The pixmap is created with default_draw_kit color.

require

  • width_ > 0
  • height_ > 0

make (width_: INTEGER, height_: INTEGER)

The pixmap is created with default_draw_kit color.

require

  • width_ > 0
  • height_ > 0

width: INTEGER
height: INTEGER
depth: INTEGER
min_width: INTEGER
min_height: INTEGER
std_width: INTEGER
std_height: INTEGER
background_color: COLOR

TODO: used ? no style ?

set_background_color (c: COLOR)

Define the color to use to clear the pixmap (pixmap is left unchanged). TODO: use this color for clear

require

  • c /= Void

clear_without_expose

clear the all the drawable area. WARNING: don't redraw the content (no expose event)

expose_paint

expose_paint paint with depth limited to the first window Containers have to propagate, with special attention to windows where expose_paint do nothing.

set_geometry (x: INTEGER, y: INTEGER, w: INTEGER, h: INTEGER)

require

  • w >= 1
  • h >= 1
  • x >= 0
  • y >= 0
  • w >= min_width
  • h >= min_height

ensure

  • width = w
  • height = h

resize (w: INTEGER, h: INTEGER)

require

  • w >= min_width
  • h >= min_height

ensure

  • width = w
  • height = h

basic_pixmap_create (w: INTEGER, h: INTEGER, returned_drawing: POINTER): POINTER
basic_pixmap_free (pixmap: POINTER, drawable_pixmap: POINTER)
basic_pixmap_draw (drawable_win: POINTER, drawable_pixmap: POINTER, src_x: INTEGER, src_y: INTEGER, dest_x: INTEGER, dest_y: INTEGER, w: INTEGER, h: INTEGER)
drawing_widget: POINTER

Because Windows can not paint on widgets like windows or bitmaps, it needs another object (Device Context) attached to the widget. For X11, it is the same value as widget.

parent: CONTAINER
pos_x: INTEGER
pos_y: INTEGER
x_shrink_allowed: BOOLEAN
x_expand_allowed: BOOLEAN
y_shrink_allowed: BOOLEAN
y_expand_allowed: BOOLEAN
valid_width (w: INTEGER): BOOLEAN
valid_height (h: INTEGER): BOOLEAN
area: RECT
root_area: RECT
set_x_shrink (b: BOOLEAN)
set_x_expand (b: BOOLEAN)
set_y_shrink (b: BOOLEAN)
set_y_expand (b: BOOLEAN)
set_shrink (b: BOOLEAN)

change both x and y shrink state

set_expand (b: BOOLEAN)

change both x and y expand state

set_parent (p: CONTAINER)

require

  • p = Void implies parent /= Void
  • p /= Void implies parent = Void
  • p /= Void implies p.has_child(Current)

ensure

  • parent = p

computing_size: BOOLEAN
state: INTEGER

use values from STATE_CONSTANTS

frozen is_state_normal: BOOLEAN
frozen is_state_active: BOOLEAN
frozen is_state_prelight: BOOLEAN
frozen is_state_selected: BOOLEAN
frozen is_state_insensitive: BOOLEAN
frozen set_state_normal
frozen set_state_active
frozen set_state_prelight
frozen set_state_selected
frozen set_state_insensitive
set_state (n: INTEGER)
renderer: RENDERER
state_normal: INTEGER
state_active: INTEGER
state_prelight: INTEGER
state_selected: INTEGER
state_insensitive: INTEGER
deferred hash_code: INTEGER

The hash-code value of Current.

ensure

  • good_hash_value: Result >= 0

deferred is_equal (other: PIXMAP): BOOLEAN

Is other attached to an object considered equal to current object ?

require

  • other /= Void

ensure

  • Result implies hash_code = other.hash_code
  • commutative: generating_type = other.generating_type implies Result = other.is_equal(Current)

widget: POINTER

widget identifier from the native graphic API.

vision: VISION
font_manager: FONT_MANAGER
default_font: BASIC_FONT
white_color: COLOR
black_color: COLOR
dim_grey_color: COLOR
dark_grey_color: COLOR
grey_color: COLOR
light_grey_color: COLOR
dark_blue_color: COLOR
medium_blue_color: COLOR
blue_color: COLOR
royal_blue_color: COLOR
deep_sky_blue_color: COLOR
sky_blue_color: COLOR
light_sky_blue_color: COLOR
steel_blue_color: COLOR
light_steel_blue_color: COLOR
light_blue_color: COLOR
pale_turquoise_color: COLOR
dark_turquoise_color: COLOR
medium_turquoise_color: COLOR
turquoise_color: COLOR
dark_cyan_color: COLOR
cyan_color: COLOR
light_cyan_color: COLOR
dark_green_color: COLOR
green_color: COLOR
light_green_color: COLOR
yellow_green_color: COLOR
dark_khaki_color: COLOR
khaki_color: COLOR
yellow_color: COLOR
light_yellow_color: COLOR
gold_color: COLOR
beige_color: COLOR
chocolate_color: COLOR
firebrick_color: COLOR
brown_color: COLOR
dark_salmon_color: COLOR
salmon_color: COLOR
light_salmon_color: COLOR
dark_orange_color: COLOR
orange_color: COLOR
orange_red_color: COLOR
dark_red_color: COLOR
red_color: COLOR
hot_pink_color: COLOR
deep_pink_color: COLOR
pink_color: COLOR
light_pink_color: COLOR
pale_violet_red_color: COLOR
maroon_color: COLOR
medium_violet_red_color: COLOR
violet_red_color: COLOR
violet_color: COLOR
dark_magenta_color: COLOR
magenta_color: COLOR
dark_violet_color: COLOR
blue_violet_color: COLOR
medium_purple_color: COLOR
purple_color: COLOR
center_alignment: ALIGNMENT
left_alignment: ALIGNMENT
right_alignment: ALIGNMENT
top_alignment: ALIGNMENT
down_alignment: ALIGNMENT
top_left_alignment: ALIGNMENT
top_right_alignment: ALIGNMENT
down_right_alignment: ALIGNMENT
down_left_alignment: ALIGNMENT

Class invariant