# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # Anti-aliasing modes used by {Wx::GraphicsContext#set_antialias_mode}. # # # class AntialiasMode < Wx::Enum # No anti-aliasing. # ANTIALIAS_NONE = Wx::AntialiasMode.new(0) # The default anti-aliasing. # ANTIALIAS_DEFAULT = Wx::AntialiasMode.new(1) end # AntialiasMode # Interpolation quality used by {Wx::GraphicsContext#set_interpolation_quality}. # # # class InterpolationQuality < Wx::Enum # default interpolation, based on type of context, in general medium quality # INTERPOLATION_DEFAULT = Wx::InterpolationQuality.new(0) # no interpolation # INTERPOLATION_NONE = Wx::InterpolationQuality.new(1) # fast interpolation, suited for interactivity # INTERPOLATION_FAST = Wx::InterpolationQuality.new(2) # better quality # INTERPOLATION_GOOD = Wx::InterpolationQuality.new(3) # best quality, not suited for interactivity # INTERPOLATION_BEST = Wx::InterpolationQuality.new(4) end # InterpolationQuality # Compositing is done using Porter-Duff compositions (see http://keithp.com/~keithp/porterduff/p253-porter.pdf) with {Wx::GraphicsContext#set_composition_mode}. # # The description give a short equation on how the values of a resulting pixel are calculated. R = Result, S = Source, D = Destination, colors premultiplied with alpha Ra, Sa, Da their alpha components # class CompositionMode < Wx::Enum # Indicates invalid or unsupported composition mode. # COMPOSITION_INVALID = Wx::CompositionMode.new(-1) # R = 0 # COMPOSITION_CLEAR = Wx::CompositionMode.new(0) # R = S # COMPOSITION_SOURCE = Wx::CompositionMode.new(1) # R = S + D*(1 - Sa) # COMPOSITION_OVER = Wx::CompositionMode.new(2) # R = S*Da # COMPOSITION_IN = Wx::CompositionMode.new(3) # R = S*(1 - Da) # COMPOSITION_OUT = Wx::CompositionMode.new(4) # R = S*Da + D*(1 - Sa) # COMPOSITION_ATOP = Wx::CompositionMode.new(5) # R = D, essentially a noop # COMPOSITION_DEST = Wx::CompositionMode.new(6) # R = S*(1 - Da) + D # COMPOSITION_DEST_OVER = Wx::CompositionMode.new(7) # R = D*Sa # COMPOSITION_DEST_IN = Wx::CompositionMode.new(8) # R = D*(1 - Sa) # COMPOSITION_DEST_OUT = Wx::CompositionMode.new(9) # R = S*(1 - Da) + D*Sa # COMPOSITION_DEST_ATOP = Wx::CompositionMode.new(10) # R = S*(1 - Da) + D*(1 - Sa) # COMPOSITION_XOR = Wx::CompositionMode.new(11) # R = S + D # COMPOSITION_ADD = Wx::CompositionMode.new(12) # Result is the absolute value of the difference between the source and the destination. # COMPOSITION_DIFF = Wx::CompositionMode.new(13) end # CompositionMode # Used to indicate what kind of gradient is set in a {Wx::GraphicsPenInfo} object. # # # class GradientType < Wx::Enum # # GRADIENT_NONE = Wx::GradientType.new(0) # # GRADIENT_LINEAR = Wx::GradientType.new(1) # # GRADIENT_RADIAL = Wx::GradientType.new(2) end # GradientType # # NULL_GRAPHICS_PEN = nil # # NULL_GRAPHICS_BRUSH = nil # # NULL_GRAPHICS_FONT = nil # # NULL_GRAPHICS_BITMAP = nil # # NULL_GRAPHICS_MATRIX = nil # # NULL_GRAPHICS_PATH = nil # A {Wx::GraphicsContext} instance is the object that is drawn upon. # It is created by a renderer using Wx::GraphicsRenderer#create_context. This can be either directly using a renderer instance, or indirectly using the static convenience {Wx::GraphicsContext.create} functions of {Wx::GraphicsContext} that always delegate the task to the default renderer. # # ```ruby # class MyCanvas < Wx::ScrolledWindow # # def on_paint(event) # # Create paint DC # self.paint do |dc| # # Create graphics context from it # Wx::GraphicsContext.draw_on(dc) do |gc| # # make a path that contains a circle and some lines # gc.set_pen(Wx::RED_PEN) # path = gc.create_path # path.add_circle(50.0, 50.0, 50.0) # path.move_to_point(0.0, 50.0) # path.add_line_to_point(100.0, 50.0) # path.move_to_point(50.0, 0.0) # path.add_line_to_point(50.0, 100.0) # path.close_sub_path # path.add_rectangle(25.0, 25.0, 50.0, 50.0) # # gc.stroke_path(path) # end # end # end # end # end # ``` # # For some renderers (like Direct2D or Cairo) processing of drawing operations may be deferred (Direct2D render target normally builds up a batch of rendering commands but defers processing of these commands, Cairo operates on a separate surface) so to make drawing results visible you need to update the content of the context by calling {Wx::GraphicsContext#flush} or by destroying the context. # # === # # Category: Graphics Device Interface (GDI), Device Contexts # @see Wx::GraphicsRenderer#create_context # @see Wx::GCDC # @see Wx::DC # # # # @note This class is untracked and should not be derived from nor instances extended! class GraphicsContext < GraphicsObject # Resets the clipping to original shape. # @return [void] def reset_clip; end # @overload clip(region) # Sets the clipping region to the intersection of the given region and the previously set clipping region. # The clipping region is an area to which drawing is restricted. # # - Clipping region should be given in logical coordinates. # - Calling this function can only make the clipping region smaller, never larger. # - You need to call {Wx::GraphicsContext#reset_clip} first if you want to set the clipping region exactly to the region specified. # - If resulting clipping region is empty, then all drawing upon the context is clipped out (all changes made by drawing operations are masked out). # @param region [Wx::Region] # @return [void] # @overload clip(x, y, w, h) # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param x [Float] # @param y [Float] # @param w [Float] # @param h [Float] # @return [void] def clip(*args) end # Returns bounding box of the current clipping region. # - If clipping region is empty, then empty rectangle is returned (x, y, w, h are set to zero). # @return [Array(Float,Float,Float,Float)] def get_clip_box; end alias_method :clip_box, :get_clip_box # Creates a native affine transformation matrix from the passed in values. # The default parameters result in an identity matrix. # @param a [Float] # @param b [Float] # @param c [Float] # @param d [Float] # @param tx [Float] # @param ty [Float] # @return [Wx::GraphicsMatrix] def create_matrix(a=1.0, b=0.0, c=0.0, d=1.0, tx=0.0, ty=0.0) end # Concatenates the passed in transform with the current transform of this context. # @param matrix [Wx::GraphicsMatrix] # @return [void] def concat_transform(matrix) end # Gets the current transformation matrix of this context. # @return [Wx::GraphicsMatrix] def get_transform; end alias_method :transform, :get_transform # Rotates the current transformation matrix (in radians). # @param angle [Float] # @return [void] def rotate(angle) end # Scales the current transformation matrix. # @param xScale [Float] # @param yScale [Float] # @return [void] def scale(xScale, yScale) end # Sets the current transformation matrix of this context. # @param matrix [Wx::GraphicsMatrix] # @return [void] def set_transform(matrix) end alias_method :transform=, :set_transform # Translates the current transformation matrix. # @param dx [Float] # @param dy [Float] # @return [void] def translate(dx, dy) end # Creates a native brush from a {Wx::Brush}. # @param brush [Wx::Brush] # @return [Wx::GraphicsBrush] def create_brush(brush) end # @overload create_linear_gradient_brush(x1, y1, x2, y2, c1, c2, matrix=Wx::NULL_GRAPHICS_MATRIX) # Creates a native brush with a linear gradient. # The brush starts at (x1, y1) and ends at (x2, y2). Either just the start and end gradient colours (c1 and c2) or full set of gradient stops can be specified. # The version taking {Wx::GraphicsGradientStops} is new in wxWidgets 2.9.1. # The matrix parameter was added in wxWidgets 3.1.3 # @param x1 [Float] # @param y1 [Float] # @param x2 [Float] # @param y2 [Float] # @param c1 [Wx::Colour,String,Symbol] # @param c2 [Wx::Colour,String,Symbol] # @param matrix [Wx::GraphicsMatrix] # @return [Wx::GraphicsBrush] # @overload create_linear_gradient_brush(x1, y1, x2, y2, stops, matrix=Wx::NULL_GRAPHICS_MATRIX) # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param x1 [Float] # @param y1 [Float] # @param x2 [Float] # @param y2 [Float] # @param stops [Wx::GraphicsGradientStops] # @param matrix [Wx::GraphicsMatrix] # @return [Wx::GraphicsBrush] def create_linear_gradient_brush(*args) end # @overload create_radial_gradient_brush(startX, startY, endX, endY, radius, oColor, cColor, matrix=Wx::NULL_GRAPHICS_MATRIX) # Creates a native brush with a radial gradient. # The brush originates at (startX, startY) and ends on a circle around (endX, endY) with the given radius. # The gradient may be specified either by its start and end colours oColor and cColor or by a full set of gradient stops. # The version taking {Wx::GraphicsGradientStops} is new in wxWidgets 2.9.1. # The ability to apply a transformation matrix to the gradient was added in 3.1.3 # @param startX [Float] # @param startY [Float] # @param endX [Float] # @param endY [Float] # @param radius [Float] # @param oColor [Wx::Colour,String,Symbol] # @param cColor [Wx::Colour,String,Symbol] # @param matrix [Wx::GraphicsMatrix] # @return [Wx::GraphicsBrush] # @overload create_radial_gradient_brush(startX, startY, endX, endY, radius, stops, matrix=Wx::NULL_GRAPHICS_MATRIX) # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param startX [Float] # @param startY [Float] # @param endX [Float] # @param endY [Float] # @param radius [Float] # @param stops [Wx::GraphicsGradientStops] # @param matrix [Wx::GraphicsMatrix] # @return [Wx::GraphicsBrush] def create_radial_gradient_brush(*args) end # @overload set_brush(brush) # Sets the brush for filling paths. # @param brush [Wx::Brush] # @return [void] # @overload set_brush(brush) # Sets the brush for filling paths. # @param brush [Wx::GraphicsBrush] # @return [void] def set_brush(*args) end alias_method :brush=, :set_brush # @overload create_pen(pen) # Creates a native pen from a {Wx::Pen}. # Prefer to use the overload taking {Wx::GraphicsPenInfo} unless you already have a {Wx::Pen} as constructing one only to pass it to this method is wasteful. # @param pen [Wx::Pen] # @return [Wx::GraphicsPen] # @overload create_pen(info) # Creates a native pen from a {Wx::GraphicsPenInfo}. # @param info [Wx::GraphicsPenInfo] # @return [Wx::GraphicsPen] def create_pen(*args) end # @overload set_pen(pen) # Sets the pen used for stroking. # @param pen [Wx::Pen] # @return [void] # @overload set_pen(pen) # Sets the pen used for stroking. # @param pen [Wx::GraphicsPen] # @return [void] def set_pen(*args) end alias_method :pen=, :set_pen # @overload draw_bitmap(bmp, x, y, w, h) # Draws the bitmap. # In case of a mono bitmap, this is treated as a mask and the current brushed is used for filling. # @param bmp [Wx::GraphicsBitmap] # @param x [Float] # @param y [Float] # @param w [Float] # @param h [Float] # @return [void] # @overload draw_bitmap(bmp, x, y, w, h) # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param bmp [Wx::Bitmap] # @param x [Float] # @param y [Float] # @param w [Float] # @param h [Float] # @return [void] def draw_bitmap(*args) end # Draws an ellipse. # @param x [Float] # @param y [Float] # @param w [Float] # @param h [Float] # @return [void] def draw_ellipse(x, y, w, h) end # Draws the icon. # @param icon [Wx::Icon] # @param x [Float] # @param y [Float] # @param w [Float] # @param h [Float] # @return [void] def draw_icon(icon, x, y, w, h) end # Draws the path by first filling and then stroking. # @param path [Wx::GraphicsPath] # @param fillStyle [Wx::PolygonFillMode] # @return [void] def draw_path(path, fillStyle=Wx::PolygonFillMode::ODDEVEN_RULE) end # Draws a rectangle. # @param x [Float] # @param y [Float] # @param w [Float] # @param h [Float] # @return [void] def draw_rectangle(x, y, w, h) end # Draws a rounded rectangle. # @param x [Float] # @param y [Float] # @param w [Float] # @param h [Float] # @param radius [Float] # @return [void] def draw_rounded_rectangle(x, y, w, h, radius) end # @overload draw_text(str, x, y) # Draws text at the defined position. # @param str [String] # @param x [Float] # @param y [Float] # @return [void] # @overload draw_text(str, x, y, angle) # Draws text at the defined position. # @param str [String] The text to draw. # @param x [Float] The x coordinate position to draw the text at. # @param y [Float] The y coordinate position to draw the text at. # @param angle [Float] The angle, in radians, relative to the (default) horizontal direction to draw the string. # @return [void] # @overload draw_text(str, x, y, backgroundBrush) # Draws text at the defined position. # @param str [String] The text to draw. # @param x [Float] The x coordinate position to draw the text at. # @param y [Float] The y coordinate position to draw the text at. # @param backgroundBrush [Wx::GraphicsBrush] Brush to fill the text with. # @return [void] # @overload draw_text(str, x, y, angle, backgroundBrush) # Draws text at the defined position. # @param str [String] The text to draw. # @param x [Float] The x coordinate position to draw the text at. # @param y [Float] The y coordinate position to draw the text at. # @param angle [Float] The angle, in radians, relative to the (default) horizontal direction to draw the string. # @param backgroundBrush [Wx::GraphicsBrush] Brush to fill the text with. # @return [void] def draw_text(*args) end # Creates a native graphics path which is initially empty. # @return [Wx::GraphicsPath] def create_path; end # Fills the path with the current brush. # @param path [Wx::GraphicsPath] # @param fillStyle [Wx::PolygonFillMode] # @return [void] def fill_path(path, fillStyle=Wx::PolygonFillMode::ODDEVEN_RULE) end # Strokes a single line. # @param x1 [Float] # @param y1 [Float] # @param x2 [Float] # @param y2 [Float] # @return [void] def stroke_line(x1, y1, x2, y2) end # Strokes along a path with the current pen. # @param path [Wx::GraphicsPath] # @return [void] def stroke_path(path) end # @overload create_font(font, col=Wx::BLACK) # Creates a native graphics font from a {Wx::Font} and a text colour. # For Direct2D graphics fonts can be created from TrueType fonts only. # @param font [Wx::Font,Wx::FontInfo] # @param col [Wx::Colour,String,Symbol] # @return [Wx::GraphicsFont] # @overload create_font(sizeInPixels, facename, flags=Wx::FontFlag::FONTFLAG_DEFAULT, col=Wx::BLACK) # Creates a font object with the specified attributes. # The use of overload taking {Wx::Font} is preferred, see Wx::GraphicsRenderer#create_font for more details. # For Direct2D graphics fonts can be created from TrueType fonts only. # @param sizeInPixels [Float] # @param facename [String] # @param flags [Integer] # @param col [Wx::Colour,String,Symbol] # @return [Wx::GraphicsFont] def create_font(*args) end # @overload set_font(font, colour) # Sets the font for drawing text. # For Direct2D only TrueType fonts can be used. # @param font [Wx::Font,Wx::FontInfo] # @param colour [Wx::Colour,String,Symbol] # @return [void] # @overload set_font(font) # Sets the font for drawing text. # @param font [Wx::GraphicsFont] # @return [void] def set_font(*args) end alias_method :font=, :set_font # Fills the widths array with the widths from the beginning of text to the corresponding character of text. # @param text [String] # @return [Array] def get_partial_text_extents(text) end alias_method :partial_text_extents, :get_partial_text_extents # Gets the dimensions of the string using the currently selected font. # @param text [String] The text string to measure. # @return [Array(Float,Float,Float,Float)] def get_text_extent(text) end alias_method :text_extent, :get_text_extent # Begin a new document (relevant only for printing / pdf etc.) If there is a progress dialog, message will be shown. # @param message [String] # @return [Boolean] def start_doc(message) end # Done with that document (relevant only for printing / pdf etc.) # @return [void] def end_doc; end # Opens a new page (relevant only for printing / pdf etc.) with the given size in points. # (If both are null the default page size will be used.) # @param width [Float] # @param height [Float] # @return [void] def start_page(width=0, height=0) end # Ends the current page (relevant only for printing / pdf etc.) # @return [void] def end_page; end # Creates {Wx::GraphicsBitmap} from an existing {Wx::Bitmap}. # Returns an invalid {Wx::NULL_GRAPHICS_BITMAP} on failure. # @param bitmap [Wx::Bitmap] # @return [Wx::GraphicsBitmap] def create_bitmap(bitmap) end # Creates {Wx::GraphicsBitmap} from an existing {Wx::Image}. # This method is more efficient than converting {Wx::Image} to {Wx::Bitmap} first and then calling {Wx::GraphicsContext#create_bitmap} but otherwise has the same effect. # Returns an invalid {Wx::NULL_GRAPHICS_BITMAP} on failure. # @param image [Wx::Image] # @return [Wx::GraphicsBitmap] def create_bitmap_from_image(image) end # Extracts a sub-bitmap from an existing bitmap. # @param bitmap [Wx::GraphicsBitmap] # @param x [Float] # @param y [Float] # @param w [Float] # @param h [Float] # @return [Wx::GraphicsBitmap] def create_sub_bitmap(bitmap, x, y, w, h) end # All rendering will be done into a fully transparent temporary context. # Layers can be nested by making balanced calls to {Wx::GraphicsContext#begin_layer}/EndLayer(). # @param opacity [Float] # @return [void] def begin_layer(opacity) end # Composites back the drawings into the context with the opacity given at the {Wx::GraphicsContext#begin_layer} call. # @return [void] def end_layer; end # Push the current state (like transformations, clipping region and quality settings) of the context on a stack. # Multiple balanced calls to {Wx::GraphicsContext#push_state} and {Wx::GraphicsContext#pop_state} can be nested. # @see Wx::GraphicsContext#pop_state # @return [void] def push_state; end # Sets current state of the context to the state saved by a preceding call to {Wx::GraphicsContext#push_state} and removes that state from the stack of saved states. # # @see Wx::GraphicsContext#push_state # @return [void] def pop_state; end # Make sure that the current content of this context is immediately visible. # @return [void] def flush; end # Sets the antialiasing mode, returns true if it supported. # @param antialias [Wx::AntialiasMode] # @return [Boolean] def set_antialias_mode(antialias) end alias_method :antialias_mode=, :set_antialias_mode # Returns the current shape antialiasing mode. # @return [Wx::AntialiasMode] def get_antialias_mode; end alias_method :antialias_mode, :get_antialias_mode # Sets the interpolation quality, returns true if it is supported. # Not implemented in Cairo backend currently. # @param interpolation [Wx::InterpolationQuality] # @return [Boolean] def set_interpolation_quality(interpolation) end alias_method :interpolation_quality=, :set_interpolation_quality # Returns the current interpolation quality. # @return [Wx::InterpolationQuality] def get_interpolation_quality; end alias_method :interpolation_quality, :get_interpolation_quality # Sets the compositing operator, returns true if it supported. # @param op [Wx::CompositionMode] # @return [Boolean] def set_composition_mode(op) end alias_method :composition_mode=, :set_composition_mode # Returns the current compositing operator. # @return [Wx::CompositionMode] def get_composition_mode; end alias_method :composition_mode, :get_composition_mode # Returns the size of the graphics context in device coordinates. # @return [Array(Float,Float)] def get_size; end alias_method :size, :get_size # Returns the resolution of the graphics context in device points per inch. # @return [Array(Float,Float)] def get_dpi; end alias_method :dpi, :get_dpi # Returns the associated window if any. # If this context was created using {Wx::GraphicsContext.create} overload taking {Wx::Window} or {Wx::WindowDC}, this method returns the corresponding window. Otherwise returns NULL. # A possibly NULL window pointer. # @return [Wx::Window] def get_window; end alias_method :window, :get_window # Helper to determine if a 0.5 offset should be applied for the drawing operation. # @return [Boolean] def should_offset; end # Indicates whether the context should try to offset for pixel boundaries. # This only makes sense on bitmap devices like screen. By default this is turned off. # @param enable [Boolean] # @return [void] def enable_offset(enable=true) end # Helper to determine if a 0.5 offset should be applied for the drawing operation. # @return [void] def disable_offset; end # Helper to determine if a 0.5 offset should be applied for the drawing operation. # @return [Boolean] def offset_enabled; end # @overload from_dip(sz) # Convert DPI-independent pixel values to the value in pixels appropriate for the graphics context. # See {Wx::Window#from_dip(sz)} for more info about converting device independent pixel values. # @param sz [Array(Integer, Integer), Wx::Size] # @return [Wx::Size] # @overload from_dip(pt) # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param pt [Array(Integer, Integer), Wx::Point] # @return [Wx::Point] # @overload from_dip(d) # Convert DPI-independent value in pixels to the value in pixels appropriate for the graphics context. # This is the same as FromDIP(const {Wx::Size}& sz) overload, but assumes that the resolution is the same in horizontal and vertical directions. # @param d [Integer] # @return [Integer] def from_dip(*args) end # @overload to_dip(sz) # Convert pixel values of the current graphics context to DPI-independent pixel values. # See {Wx::Window#to_dip(sz)} for more info about converting device independent pixel values. # @param sz [Array(Integer, Integer), Wx::Size] # @return [Wx::Size] # @overload to_dip(pt) # This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. # @param pt [Array(Integer, Integer), Wx::Point] # @return [Wx::Point] # @overload to_dip(d) # Convert pixel values of the current graphics context to DPI-independent pixel values. # This is the same as ToDIP(const {Wx::Size}& sz) overload, but assumes that the resolution is the same in horizontal and vertical directions. # @param d [Integer] # @return [Integer] def to_dip(*args) end end # GraphicsContext # Represents a single gradient stop in a collection of gradient stops as represented by {Wx::GraphicsGradientStops}. # === # # Category: Graphics Device Interface (GDI) # # # @note This class is untracked and should not be derived from nor instances extended! class GraphicsGradientStop < ::Object # Return the stop colour. # @return [Wx::Colour,String,Symbol] def get_colour; end alias_method :colour, :get_colour # Change the stop colour. # @param col [Wx::Colour,String,Symbol] The new colour. # @return [void] def set_colour(col) end alias_method :colour=, :set_colour # Return the stop position. # @return [Float] def get_position; end alias_method :position, :get_position # Change the stop position. # @param pos [Float] The new position, must always be in [0, 1] range. # @return [void] def set_position(pos) end alias_method :position=, :set_position end # GraphicsGradientStop # Represents a collection of {Wx::GraphicGradientStop} values for use with CreateLinearGradientBrush and CreateRadialGradientBrush. # The stops are maintained in order of position. If two or more stops are added with the same position then the one(s) added later come later. This can be useful for producing discontinuities in the colour gradient. # Notice that this class is write-once, you can't modify the stops once they had been added. # === # # Category: Graphics Device Interface (GDI) # # # @note This class is untracked and should not be derived from nor instances extended! class GraphicsGradientStops < ::Object # @overload add(stop) # Add a new stop. # @param stop [Wx::GraphicsGradientStop] # @return [void] # @overload add(col, pos) # Add a new stop. # @param col [Wx::Colour] # @param pos [Float] # @return [void] def add(*args) end # Initializes the gradient stops with the given boundary colours. # Creates a {Wx::GraphicsGradientStops} instance with start colour given by startCol and end colour given by endCol. # @param startCol [Wx::Colour] # @param endCol [Wx::Colour] # @return [Wx::GraphicsGradientStops] def initialize(startCol=Wx::TransparentColour, endCol=Wx::TransparentColour) end # Returns the stop at the given index. # @param n [unsigned] The index, must be in [0, {Wx::GraphicsGradientStops#get_count}) range. # @return [Wx::GraphicsGradientStop] def item(n) end # Returns the number of stops. # @return [Integer] def get_count; end alias_method :count, :get_count # Set the start colour to col. # @param col [Wx::Colour] # @return [void] def set_start_colour(col) end alias_method :start_colour=, :set_start_colour # Returns the start colour. # @return [Wx::Colour] def get_start_colour; end alias_method :start_colour, :get_start_colour # Set the end colour to col. # @param col [Wx::Colour] # @return [void] def set_end_colour(col) end alias_method :end_colour=, :set_end_colour # Returns the end colour. # @return [Wx::Colour] def get_end_colour; end alias_method :end_colour, :get_end_colour end # GraphicsGradientStops # This class is a helper used for {Wx::GraphicsPen} creation using named parameter idiom: it allows specifying various {Wx::GraphicsPen} attributes using the chained calls to its clearly named methods instead of passing them in the fixed order to {Wx::GraphicsPen} constructors. # Typically you would use {Wx::GraphicsPenInfo} with a {Wx::GraphicsContext}, e.g. to start drawing with a dotted blue pen slightly wider than normal you could write the following: # ``` # wxGraphicsContext ctx = wxGraphicsContext::Create(dc); # # ctx.SetPen(wxGraphicsPenInfo(*wxBLUE).Width(1.25).Style(wxPENSTYLE_DOT)); # ``` # # # @note This class is untracked and should not be derived from nor instances extended! class GraphicsPenInfo < ::Object # @param colour [Wx::Colour,String,Symbol] # @param width [Float] # @param style [Wx::PenStyle] # @return [Wx::GraphicsPenInfo] def initialize(colour=(Wx::Colour.new()), width=1.0, style=Wx::PenStyle::PENSTYLE_SOLID) end # @param col [Wx::Colour,String,Symbol] # @return [Wx::GraphicsPenInfo] def colour(col) end # @param width [Float] # @return [Wx::GraphicsPenInfo] def width(width) end # @param style [Wx::PenStyle] # @return [Wx::GraphicsPenInfo] def style(style) end # @param stipple [Wx::Bitmap] # @return [Wx::GraphicsPenInfo] def stipple(stipple) end # @param nb_dashes [Integer] # @param dash [Wx::Dash] # @return [Wx::GraphicsPenInfo] def dashes(nb_dashes, dash) end # @param join [Wx::PenJoin] # @return [Wx::GraphicsPenInfo] def join(join) end # @param cap [Wx::PenCap] # @return [Wx::GraphicsPenInfo] def cap(cap) end # @overload linear_gradient(x1, y1, x2, y2, c1, c2, matrix=Wx::NULL_GRAPHICS_MATRIX) # @param x1 [Float] # @param y1 [Float] # @param x2 [Float] # @param y2 [Float] # @param c1 [Wx::Colour,String,Symbol] # @param c2 [Wx::Colour,String,Symbol] # @param matrix [Wx::GraphicsMatrix] # @return [Wx::GraphicsPenInfo] # @overload linear_gradient(x1, y1, x2, y2, stops, matrix=Wx::NULL_GRAPHICS_MATRIX) # @param x1 [Float] # @param y1 [Float] # @param x2 [Float] # @param y2 [Float] # @param stops [Wx::GraphicsGradientStops] # @param matrix [Wx::GraphicsMatrix] # @return [Wx::GraphicsPenInfo] def linear_gradient(*args) end # @overload radial_gradient(startX, startY, endX, endY, radius, oColor, cColor, matrix=Wx::NULL_GRAPHICS_MATRIX) # @param startX [Float] # @param startY [Float] # @param endX [Float] # @param endY [Float] # @param radius [Float] # @param oColor [Wx::Colour,String,Symbol] # @param cColor [Wx::Colour,String,Symbol] # @param matrix [Wx::GraphicsMatrix] # @return [Wx::GraphicsPenInfo] # @overload radial_gradient(startX, startY, endX, endY, radius, stops, matrix=Wx::NULL_GRAPHICS_MATRIX) # @param startX [Float] # @param startY [Float] # @param endX [Float] # @param endY [Float] # @param radius [Float] # @param stops [Wx::GraphicsGradientStops] # @param matrix [Wx::GraphicsMatrix] # @return [Wx::GraphicsPenInfo] def radial_gradient(*args) end # @return [Wx::Colour] def get_colour; end # @return [Wx::Bitmap] def get_stipple; end # @return [Wx::PenStyle] def get_style; end # @return [Wx::PenJoin] def get_join; end # @return [Wx::PenCap] def get_cap; end # @param ptr [Wx::Dash] # @return [Integer] def get_dashes(ptr) end alias_method :dashes, :get_dashes # @return [Integer] def get_dash_count; end alias_method :dash_count, :get_dash_count # @return [Boolean] def is_transparent; end alias_method :transparent?, :is_transparent # @return [Float] def get_width; end # @return [Wx::GradientType] def get_gradient_type; end alias_method :gradient_type, :get_gradient_type # @return [Float] def get_x1; end alias_method :x1, :get_x1 # @return [Float] def get_y1; end alias_method :y1, :get_y1 # @return [Float] def get_x2; end alias_method :x2, :get_x2 # @return [Float] def get_y2; end alias_method :y2, :get_y2 # @return [Float] def get_start_x; end alias_method :start_x, :get_start_x # @return [Float] def get_start_y; end alias_method :start_y, :get_start_y # @return [Float] def get_end_x; end alias_method :end_x, :get_end_x # @return [Float] def get_end_y; end alias_method :end_y, :get_end_y # @return [Float] def get_radius; end alias_method :radius, :get_radius # @return [Wx::GraphicsGradientStops] def get_stops; end alias_method :stops, :get_stops end # GraphicsPenInfo end