Class: Wx::GCDC

Inherits:
DC show all
Defined in:
lib/wx/doc/gen/gcdc.rb,
lib/wx/doc/gc_dc.rb

Overview

Note:

This class is untracked and should not be derived from nor instances extended!

GCDC is a device context that draws on a GraphicsContext.

GCDC does its best to implement DC API, but the following features are not (fully) implemented because GraphicsContext doesn’t support them:

Category: Device Contexts

See Also:

Requires:

  • USE_GRAPHICS_CONTEXT

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DC

#blit, #calc_bounding_box, #can_draw_bitmap, #can_get_text_extent, #can_use_transform_matrix, #clear, #copy_attributes, #cross_hair, #destroy_clipping_region, #device_to_logical, #device_to_logical_rel, #device_to_logical_x, #device_to_logical_x_rel, #device_to_logical_y, #device_to_logical_y_rel, #draw_arc, #draw_bitmap, #draw_check_mark, #draw_circle, #draw_ellipse, #draw_elliptic_arc, #draw_icon, #draw_label, #draw_line, #draw_lines, #draw_point, #draw_poly_polygon, #draw_polygon, #draw_rectangle, #draw_rotated_text, #draw_rounded_rectangle, #draw_spline, #draw_text, #end_doc, #end_page, #flood_fill, #from_dip, #get_as_bitmap, #get_background, #get_background_mode, #get_brush, #get_char_height, #get_char_width, #get_clipping_box, #get_content_scale_factor, #get_depth, #get_device_origin, #get_dimensions, #get_dimensions_mm, #get_font, #get_font_metrics, #get_layout_direction, #get_logical_function, #get_logical_origin, #get_logical_scale, #get_map_mode, #get_multi_line_text_extent, #get_multi_line_text_size, #get_pen, #get_pixel, #get_ppi, #get_size, #get_size_mm, #get_text_background, #get_text_extent, #get_text_foreground, #get_text_size, #get_transform_matrix, #get_user_scale, #gradient_fill_concentric, #gradient_fill_linear, #is_ok, #logical_to_device, #logical_to_device_rel, #logical_to_device_x, #logical_to_device_x_rel, #logical_to_device_y, #logical_to_device_y_rel, #max_x, #max_y, #min_x, #min_y, #reset_bounding_box, #reset_transform_matrix, #set_axis_orientation, #set_background, #set_background_mode, #set_brush, #set_clipping_region, #set_device_clipping_region, #set_device_origin, #set_font, #set_layout_direction, #set_logical_function, #set_logical_origin, #set_logical_scale, #set_map_mode, #set_palette, #set_pen, #set_text_background, #set_text_foreground, #set_transform_matrix, #set_user_scale, #start_doc, #start_page, #stretch_blit, #to_dip, #with_background_mode, #with_brush, #with_font, #with_pen, #with_text_background, #with_text_foreground

Methods inherited from Object

#clone, #dup, #initialize, #is_same_as, #un_share

Constructor Details

This class inherits a constructor from Wx::Object

Class Method Details

.draw_on {|dc| ... } ⇒ ::Object .draw_on(dc) {|dc| ... } ⇒ ::Object .draw_on(dc) {|dc| ... } ⇒ ::Object .draw_on(gc) {|dc| ... } ⇒ ::Object

Creates a Wx::GCDC instance for target and passes the instance to the given block to draw on.

Overloads:

  • .draw_on {|dc| ... } ⇒ ::Object

    Returns result from block.

    Yield Parameters:

    • dc (Wx::GCDC)

      GCDC instance to draw on

    Returns:

    • (::Object)

      result from block

  • .draw_on(dc) {|dc| ... } ⇒ ::Object

    Returns result from block.

    Parameters:

    Yield Parameters:

    • dc (Wx::GCDC)

      GCDC instance to draw on

    Returns:

    • (::Object)

      result from block

  • .draw_on(dc) {|dc| ... } ⇒ ::Object

    Returns result from block.

    Parameters:

    • target (Wx::PrinterDC)

      DC to draw on

    Yield Parameters:

    • dc (Wx::GCDC)

      GCDC instance to draw on

    Returns:

    • (::Object)

      result from block

    Requires:

    • USE_PRINTING_ARCHITECTURE
    • WXMSW or WXOSX or USE_GTKPRINT
  • .draw_on(gc) {|dc| ... } ⇒ ::Object

    Note that the context will continue using the same font, pen and brush as before until #set_font, #set_pen or #set_brush is explicitly called to change them. This means that the code can use this wxDC-derived object to work using pens and brushes with alpha component, for example (which normally isn’t supported by Wx::DC API), but it also means that the return values of #get_font, #get_pen and #get_brush won’t really correspond to the actually used objects because they simply can’t represent them anyhow. If you wish to avoid such discrepancy, you need to call the setter methods to bring Wx::DC and Wx::GraphicsContext font, pen and brush in sync with each other.

    Parameters:

    Yield Parameters:

    • dc (Wx::GCDC)

      GCDC instance to draw on

    Returns:

    • (::Object)

      result from block



38
# File 'lib/wx/doc/gc_dc.rb', line 38

def self.draw_on(*arg) end

Instance Method Details

#get_graphics_contextWx::GraphicsContext Also known as: graphics_context

Retrieves associated Wx::GraphicsContext.

Returns:



31
# File 'lib/wx/doc/gen/gcdc.rb', line 31

def get_graphics_context; end

#set_graphics_context(context) ⇒ void Also known as: graphics_context=

This method returns an undefined value.

Set the graphics context to be used for this Wx::GCDC.

Note that this object takes ownership of context and will delete it when it is destroyed or when #set_graphics_context is called again. Also, unlike the constructor taking Wx::GraphicsContext, this method will reapply the current font, pen and brush, so that this object continues to use them, if they had been changed before (which is never the case when constructing Wx::GCDC directly from Wx::GraphicsContext).

Parameters:



40
# File 'lib/wx/doc/gen/gcdc.rb', line 40

def set_graphics_context(context) end