Top |
Extents, viewports and clippingExtents, viewports and clipping — Size information about the current context and the screen |
gint | grx_get_width () |
gint | grx_get_height () |
gint | grx_get_max_x () |
gint | grx_get_max_y () |
gint | grx_get_screen_width () |
gint | grx_get_screen_height () |
gint | grx_get_virtual_width () |
gint | grx_get_virtual_height () |
gboolean | grx_is_screen_virtual () |
gint | grx_get_viewport_x () |
gint | grx_get_viewport_y () |
gboolean | grx_set_viewport () |
void | grx_set_clip_box () |
void | grx_get_clip_box () |
void | grx_reset_clip_box () |
gint | grx_get_clip_box_min_x () |
gint | grx_get_clip_box_min_y () |
gint | grx_get_clip_box_max_x () |
gint | grx_get_clip_box_max_y () |
These functions are used to get information about the extents of the current context and the screen. Additionally, the clipping limits used by drawing functions can be set to an arbitrary area of the current context.
gint
grx_get_max_x (void
);
Gets the index of the last pixel of the current context in the X direction.
In other words, this is grx_get_width()
-1.
gint
grx_get_max_y (void
);
Gets the index of the last pixel of the current context in the Y direction.
In other words, this is grx_get_height()
-1.
gint
grx_get_screen_width (void
);
Gets the width of the physical screen in pixels.
gint
grx_get_screen_height (void
);
Gets the height of the physical screen in pixels.
gint
grx_get_virtual_width (void
);
Gets the width of the virtual screen in pixels.
gint
grx_get_virtual_height (void
);
Gets the height of the virtual screen in pixels.
gboolean
grx_is_screen_virtual (void
);
Checks if the current screen is a virtual screen (i.e. the virtual size is larger than the physical size).
gint
grx_get_viewport_x (void
);
Gets the starting X coordinate of the current viewport.
gint
grx_get_viewport_y (void
);
Gets the starting Y coordinate of the current viewport.
gboolean grx_set_viewport (gint x
,gint y
);
Sets the viewport on a virtual screen. The width and height of the viewport
are determined by the physical screen size (grx_get_screen_width()
and
grx_get_screen_height()
).
void grx_set_clip_box (gint x1
,gint y1
,gint x2
,gint y2
);
Sets the clipping limits on the current context.
void grx_get_clip_box (gint *x1
,gint *y1
,gint *x2
,gint *y2
);
Gets the clipping limits of the current context.
void
grx_reset_clip_box (void
);
Resets the clipping limits of the current context to the size of the current context.
gint
grx_get_clip_box_min_x (void
);
Gets the left bounds of the clipping limits of the current context.
gint
grx_get_clip_box_min_y (void
);
Gets the top bounds of the clipping limits of the current context.
gint
grx_get_clip_box_max_x (void
);
Gets the right bounds of the clipping limits of the current context.
gint
grx_get_clip_box_max_y (void
);
Gets the bottom bounds of the clipping limits of the current context.