- public bool set_driver (string driver_spec) throws Error
The driver spec is of the format "\[<name>\[::<flag>\]\] \
[gw <width>\] \[gh <height>\] \[gc <colors>\] \[dp <dpi>\]".
- public bool set_mode (GraphicsMode mode, ...) throws Error
Set the graphics mode.
- public bool set_mode_default_graphics (bool clear) throws Error
Set the mode to the default graphics mode.
- public uint get_dpi ()
Gets the display resolution of the current graphics mode or
DEFAULT_DPI if the current driver does not support getting the resolution.
- public VideoDriver get_current_video_driver ()
- public weak DeviceManager get_device_manager ()
Gets the device manager for the current video driver
- public VideoMode get_current_video_mode ()
- public VideoMode get_virtual_video_mode ()
- public FrameDriver get_current_frame_driver ()
- public FrameDriver get_screen_frame_driver ()
- public VideoMode get_first_video_mode (FrameMode mode)
- public VideoMode get_next_video_mode (VideoMode prev)
- public int get_screen_width ()
Gets the width of the physical screen in pixels.
- public int get_screen_height ()
Gets the height of the physical screen in pixels.
- public int get_virtual_width ()
Gets the width of the virtual screen in pixels.
- public int get_virtual_height ()
Gets the height of the virtual screen in pixels.
- public bool is_screen_virtual ()
Checks if the current screen is a virtual screen (i.
- public bool set_viewport (int x, int y)
Sets the viewport on a virtual screen.
- public int get_viewport_x ()
Gets the starting X coordinate of the current viewport.
- public int get_viewport_y ()
Gets the starting Y coordinate of the current viewport.
- public int screen_get_n_planes ()
Gets the number of planes for the screen's RAM frame mode.
- public int screen_get_line_offset (int width)
Gets the offset in bytes for a row of width
pixels on the
screen.
- public int screen_get_plane_size (int width, int height)
Gets the plane size in bytes required to store an image of width
x height
for the screen.
- public int screen_get_context_size (int width, int height)
Gets the total size in bytes required to store an image of width
x height
for the screen.
- public Context save_current_context (out Context? where = null)
Saves a copy of the current context.
- public unowned Context get_current_context ()
Gets the current context.
- public void set_current_context (Context? context)
Sets the current context to context
.
- public unowned Context get_screen_context ()
Gets the screen context.
- public void set_clip_box (int x1, int y1, int x2, int y2)
Sets the clipping limits on the current context.
- public void get_clip_box (out int x1, out int y1, out int x2, out int y2)
Gets the clipping limits of the current context.
- public void reset_clip_box ()
Resets the clipping limits of the current context to the size of the
current context.
- public int get_max_x ()
Gets the index of the last pixel of the current context in the X
direction.
- public int get_max_y ()
Gets the index of the last pixel of the current context in the Y
direction.
- public int get_width ()
Gets the width of the current context in pixels.
- public int get_height ()
Gets the height of the current context in pixels.
- public int get_clip_box_min_x ()
Gets the left bounds of the clipping limits of the current context.
- public int get_clip_box_min_y ()
Gets the top bounds of the clipping limits of the current context.
- public int get_clip_box_max_x ()
Gets the right bounds of the clipping limits of the current context.
- public int get_clip_box_max_y ()
Gets the bottom bounds of the clipping limits of the current context.
- public void clear_screen (Color bg)
Clears the screen using the specified background color.
- public void clear_context (Color bg)
Clears the current context using the specified background color.
- public void clear_clip_box (Color bg)
Clears the current clip box using the specified background color.
- public void draw_pixel (int x, int y, Color c)
Draw a single pixel on the current context at the specified
coordinates.
- public void draw_line (int x1, int y1, int x2, int y2, Color c)
Draws a line on the current context from the starting coordinates to
the ending coordinates using the specified color.
- public void draw_hline (int x1, int x2, int y, Color c)
Draws a horizontal line on the current context from the starting
coordinates to the ending coordinates using the specified color.
- public void draw_vline (int x, int y1, int y2, Color c)
Draws a vertical line on the current context from the starting
coordinates to the ending coordinates using the specified color.
- public void draw_box (int x1, int y1, int x2, int y2, Color c)
Draws a rectangle on the current context using the specified
coordinates and color.
- public void draw_filled_box (int x1, int y1, int x2, int y2, Color c)
Draws a filled rectangle on the current context using the specified
coordinates and color.
- public void draw_framed_box (int x1, int y1, int x2, int y2, int width, FramedBoxColors c)
Draws a framed rectangle on the current context using the specified
coordinates and colors.
- public void draw_rounded_box (int x1, int y1, int x2, int y2, int r, Color c)
Draws a rectangle with rounded corners on the current context using
the specified coordinates and color.
- public void draw_filled_rounded_box (int x1, int y1, int x2, int y2, int r, Color c)
Draws a filled rectangle with rounded corners on the current context
using the specified coordinates and color.
- public Point[] generate_ellipse (int xc, int yc, int rx, int ry)
- public Point[] generate_ellipse_arc (int xc, int yc, int rx, int ry, int start, int end)
- public void get_last_arc_coordinates (out int xs, out int ys, out int xe, out int ye, out int xc, out int yc)
Gets the starting, ending and center coordinates of the arc from the
most recent call to an arc function.
- public void draw_circle (int xc, int yc, int r, Color c)
Draws a circle on the current context centered at the specified
coordinates with the specified radius and color.
- public void draw_ellipse (int xc, int yc, int rx, int ry, Color c)
Draws an ellipse on the current context using the specified color.
- public void draw_circle_arc (int xc, int yc, int r, int start, int end, ArcStyle style, Color c)
Draws an arc on the current context centered at the specified
coordinates from the starting angle to the ending angle with the specified radius, arc style and color.
- public void draw_ellipse_arc (int xc, int yc, int rx, int ry, int start, int end, ArcStyle style, Color c)
Draws an arc on the current context centered at the specified
coordinates from the starting angle to the ending angle with the specified radii, arc style and color.
- public void draw_filled_circle (int xc, int yc, int r, Color c)
Draws a filled circle on the current context centered at the specified
coordinates with the specified radius and color.
- public void draw_filled_ellipse (int xc, int yc, int rx, int ry, Color c)
Draws a filled ellipse on the current context using the specified
color.
- public void draw_filled_circle_arc (int xc, int yc, int r, int start, int end, ArcStyle style, Color c)
Draws a filled arc on the current context centered at the specified
coordinates from the starting angle to the ending angle with the specified radius, arc style and color.
- public void draw_filled_ellipse_arc (int xc, int yc, int rx, int ry, int start, int end, ArcStyle style, Color c)
Draws a filled arc on the current context centered at the specified
coordinates from the starting angle to the ending angle with the specified radii, arc style and color.
- public void draw_polyline (Point[] points, Color c)
Draw a multi-segment line on the current context that connects each
point in the points
array using the specified color.
- public void draw_polygon (Point[] points, Color c)
Draw a closed polygon on the current context that connects each point
in the points
array using the specified color.
- public void draw_filled_convex_polygon (Point[] points, Color c)
Draw a filled polygon on the current context that connects each point
in the points
array using the specified color.
- public void draw_filled_polygon (Point[] points, Color c)
Draw a filled polygon on the current context that connects each point
in the points
array using the specified color.
- public void bit_blt (int x, int y, Context src, int x1, int y1, int x2, int y2, Color op = ( Color) WRITE)
Copies an area bounded by x1, y2, x2, y2 in the source context to the
current context at the location specified by dx, dy using the specified operation.
- public void bit_blt_1bpp (int x, int y, Context src, int x1, int y1, int x2, int y2, Color fg, Color bg)
Copies an area bounded by x1, y2, x2, y2 in the source context to the
current context at the location specified by dx, dy using the specified operation.
- public void flood_fill (int x, int y, Color border, Color c)
Flood-fills the area of the current context bounded by the color
border
using x
, y
as the starting point.
- public void flood_spill (int x1, int y1, int x2, int y2, Color old_c, Color new_c)
Replaces old color with new color in the current context in the area
bounded by the rectangle x1, y1, x2, y2.
- public void flood_spill_2 (int x1, int y1, int x2, int y2, Color old_c1, Color new_c1, Color old_c2, Color new_c2)
- public Color get_pixel_at (int x, int y)
Gets the color value of the pixel in the current context at the
specified coordinates.
- public Color* get_scan_line (int x1, int x2, int yy)
- public void put_scan_line (int x1, int x2, int yy, Color[] c, ColorMode op = WRITE)
- public void fast_draw_pixel (int x, int y, Color c)
Draw a single pixel on the current context at the specified
coordinates.
- public void fast_draw_line (int x1, int y1, int x2, int y2, Color c)
Draws a line on the current context from the starting coordinates to
the ending coordinates using the specified color.
- public void fast_draw_hline (int x1, int x2, int y, Color c)
Draws a horizontal line on the current context from the starting
coordinates to the ending coordinates using the specified color.
- public void fast_draw_vline (int x, int y1, int y2, Color c)
Draws a vertical line on the current context from the starting
coordinates to the ending coordinates using the specified color.
- public void fast_draw_box (int x1, int y1, int x2, int y2, Color c)
Draws a rectangle on the current context using the specified
coordinates and color.
- public void fast_draw_filled_box (int x1, int y1, int x2, int y2, Color c)
Draws a filled rectangle on the current context using the specified
coordinates and color.
- public void fast_draw_framed_box (int x1, int y1, int x2, int y2, int width, FramedBoxColors c)
Draws a framed rectangle on the current context using the specified
coordinates and colors.
- public void fast_bit_blt (int x, int y, Context src, int x1, int y1, int x2, int y2, Color op = ( Color) WRITE)
Copies an area bounded by x1, y2, x2, y2 in the source context to the
current context at the location specified by dx, dy using the specified operation.
- public Color fast_get_pixel_at (int x, int y)
Gets the color value of the pixel in the current context at the
specified coordinates.
- public void draw_text (string text, int x, int y, TextOptions options)
Draws the text at the specified coordinates using options
.
- public void draw_line_with_options (int x1, int y1, int x2, int y2, LineOptions o)
Draws a line on the current context from the starting coordinates to
the ending coordinates using the specified options.
- public void draw_box_with_options (int x1, int y1, int x2, int y2, LineOptions o)
Draws a rectangle on the current context using the specified
coordinates and options.
- public void draw_circle_with_options (int xc, int yc, int r, LineOptions o)
Draws a circle on the current context centered at the specified
coordinates with the specified radius and options.
- public void draw_ellipse_with_options (int xc, int yc, int rx, int ry, LineOptions o)
Draws an ellipse on the current context using the specified options.
- public void draw_circle_arc_with_options (int xc, int yc, int r, int start, int end, ArcStyle style, LineOptions o)
Draws an arc on the current context centered at the specified
coordinates from the starting angle to the ending angle with the specified radius, arc style and options.
- public void draw_ellipse_arc_with_options (int xc, int yc, int rx, int ry, int start, int end, ArcStyle style, LineOptions o)
Draws an arc on the current context centered at the specified
coordinates from the starting angle to the ending angle with the specified radii, arc style and options.
- public void draw_polyline_with_options (Point[] points, LineOptions o)
Draw a multi-segment line on the current context that connects each
point in the points
array using the specified options.
- public void draw_polygon_with_options (Point[] points, LineOptions o)
Draw a closed polygon on the current context that connects each point
in the points
array using the specified options.
- public void draw_pixmap (int x, int y, Pixmap p)
Draws the entire image on the current context with the top, left
corner at x
, y
.
- public void draw_pixmap_tiled (int x1, int y1, int x2, int y2, Pixmap p)
Draws as much of the image as possible (repeating if necessary) on the
current in the rectangle defined by x1
, y1
and x2
, y2
- public void draw_pixel_with_offset_pixmap (int x0, int y0, int x, int y, Pixmap p)
Draws a single pixel of an pixmap on the current context at x
, y
.
- public void draw_line_with_pixmap (int x1, int y1, int x2, int y2, LineOptions o, Pixmap p)
Draws a line on the current context from the starting coordinates to
the ending coordinates using the specified line options and pixmap.
- public void draw_hline_with_offset_pixmap (int x0, int y0, int x, int y, int width, Pixmap p)
Draws a single line of an pixmap on the current context starting at
x
, y
.
- public void draw_box_with_pixmap (int x1, int y1, int x2, int y2, LineOptions o, Pixmap p)
Draws a rectangle on the current context using the specified
coordinates and line options and pixmap.
- public void draw_circle_with_pixmap (int xc, int yc, int r, LineOptions o, Pixmap p)
Draws a circle on the current context centered at the specified
coordinates with the specified radius and line options and pixmap.
- public void draw_ellipse_with_pixmap (int xc, int yc, int rx, int ry, LineOptions o, Pixmap p)
Draws an ellipse on the current context using the specified line
options and pattern.
- public void draw_circle_arc_with_pixmap (int xc, int yc, int r, int start, int end, ArcStyle style, LineOptions o, Pixmap p)
Draws an arc on the current context centered at the specified
coordinates from the starting angle to the ending angle with the specified radius, arc style and line options and pixmap.
- public void draw_ellipse_arc_with_pixmap (int xc, int yc, int rx, int ry, int start, int end, ArcStyle style, LineOptions o, Pixmap p)
Draws an arc on the current context centered at the specified
coordinates from the starting angle to the ending angle with the specified radii, arc style and line options and pixmap.
- public void draw_polyline_with_pixmap (Point[] points, LineOptions o, Pixmap p)
Draw a multi-segment line on the current context that connects each
point in the points
array using the specified line options and pixmap.
- public void draw_polygon_with_pixmap (Point[] points, LineOptions o, Pixmap p)
Draw a closed polygon on the current context that connects each point
in the points
array using the specified line options and pixmap.
- public void draw_filled_pixel_with_pixmap (int x, int y, Pixmap p)
Draw a single pixel on the current context at the specified
coordinates.
- public void draw_filled_line_with_pixmap (int x1, int y1, int x2, int y2, Pixmap p)
Draws a line on the current context from the starting coordinates to
the ending coordinates using the specified pixmap.
- public void draw_filled_box_with_pixmap (int x1, int y1, int x2, int y2, Pixmap p)
Draws a filled rectangle on the current context using the specified
coordinates and pixmap.
- public void draw_filled_box_with_offset_pixmap (int x0, int y0, int x1, int y1, int x2, int y2, Pixmap p)
Fills the rectangle x1
, y1
, x2
,
y2
in the current context with the pixmap.
- public void draw_filled_circle_with_pixmap (int xc, int yc, int r, Pixmap p)
Draws a filled circle on the current context centered at the specified
coordinates with the specified radius and pixmap.
- public void draw_filled_ellipse_with_pixmap (int xc, int yc, int rx, int ry, Pixmap p)
Draws a filled ellipse on the current context using the specified
pixmap.
- public void draw_filled_circle_arc_with_pixmap (int xc, int yc, int r, int start, int end, int style, Pixmap p)
Draws a filled arc on the current context centered at the specified
coordinates from the starting angle to the ending angle with the specified radius, arc style and pixmap.
- public void draw_filled_ellipse_arc_with_pixmap (int xc, int yc, int rx, int ry, int start, int end, int style, Pixmap p)
Draws a filled arc on the current context centered at the specified
coordinates from the starting angle to the ending angle with the specified radii, arc style and pixmap.
- public void draw_filled_convex_polygon_with_pixmap (Point[] points, Pixmap p)
Draw a filled polygon on the current context that connects each point
in the points
array using the specified pixmap.
- public void draw_filled_polygon_with_pixmap (Point[] points, Pixmap p)
Draw a filled polygon on the current context that connects each point
in the points
array using the specified pixmap.
- public void flood_fill_with_pixmap (int x, int y, Color border, Pixmap p)
Flood-fills the area of the current context bounded by the color
border
using x
, y
as the starting point.
- public bool query_pnm_file (string filename, out PnmFormat format, out int width, out int height, out int maxval)
Query format, width and height data from a PNM file
- public bool query_pnm_data (ByteArray data, out PnmFormat format, out int width, out int height, out int maxval)
Query format, width and height data from a PNM buffer
- public bool query_png_file (string filename, out int width, out int height)
Query width and height data from a PNG file
- public bool query_jpeg_file (string filename, out int width, out int height)
Query width and height data from a JPEG file
- public bool query_jpeg_data (ByteArray data, out int width, out int height)
Query width and height data from a JPEG file
- public void resize_gray_map (uint8* map, int pitch, int old_width, int old_height, int new_width, int new_height)