# :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 # This class is the superclass of native graphics objects like pens etc. # It allows reference counting. Not instantiated by user code. # === # # Category: Graphics Device Interface (GDI) # @see Wx::GraphicsBrush # @see Wx::GraphicsPen # @see Wx::GraphicsMatrix # @see Wx::GraphicsPath # # class GraphicsObject < Object # # false if this object is valid, otherwise returns true. # @return [true,false] def is_null; end alias_method :null?, :is_null end # GraphicsObject # A {Wx::GraphicsPen} is a native representation of a pen. # The contents are specific and private to the respective renderer. Instances are ref counted and can therefore be assigned as usual. The only way to get a valid instance is via {Wx::GraphicsContext#create_pen} or Wx::GraphicsRenderer#create_pen. # === # # Category: Graphics Device Interface (GDI) # class GraphicsPen < GraphicsObject end # GraphicsPen # A {Wx::GraphicsBrush} is a native representation of a brush. # The contents are specific and private to the respective renderer. Instances are ref counted and can therefore be assigned as usual. The only way to get a valid instance is via {Wx::GraphicsContext#create_brush} or Wx::GraphicsRenderer#create_brush. # === # # Category: Graphics Device Interface (GDI) # class GraphicsBrush < GraphicsObject end # GraphicsBrush # A {Wx::GraphicsPath} is a native representation of a geometric path. # The contents are specific and private to the respective renderer. Instances are reference counted and can therefore be assigned as usual. The only way to get a valid instance is by using {Wx::GraphicsContext#create_path} or Wx::GraphicsRenderer#create_path. # === # # Category: Graphics Device Interface (GDI) # class GraphicsPath < GraphicsObject # @overload add_arc(x, y, r, startAngle, endAngle, clockwise) # Adds an arc of a circle. # The circle is defined by the coordinates of its centre (x, y) or c and its radius r. The arc goes from the starting angle startAngle to endAngle either clockwise or counter-clockwise depending on the value of clockwise argument. # The angles are measured in radians but, contrary to the usual mathematical convention, are always clockwise from the horizontal axis. # If for clockwise arc endAngle is less than startAngle it will be progressively increased by 2*pi until it is greater than startAngle. If for counter-clockwise arc endAngle is greater than startAngle it will be progressively decreased by 2*pi until it is less than startAngle. # If there is a current point set, an initial line segment will be added to the path to connect the current point to the beginning of the arc. # @param x [Float] # @param y [Float] # @param r [Float] # @param startAngle [Float] # @param endAngle [Float] # @param clockwise [true,false] # @return [void] # @overload add_arc(c, r, startAngle, endAngle, clockwise) # Adds an arc of a circle. # The circle is defined by the coordinates of its centre (x, y) or c and its radius r. The arc goes from the starting angle startAngle to endAngle either clockwise or counter-clockwise depending on the value of clockwise argument. # The angles are measured in radians but, contrary to the usual mathematical convention, are always clockwise from the horizontal axis. # If for clockwise arc endAngle is less than startAngle it will be progressively increased by 2*pi until it is greater than startAngle. If for counter-clockwise arc endAngle is greater than startAngle it will be progressively decreased by 2*pi until it is less than startAngle. # If there is a current point set, an initial line segment will be added to the path to connect the current point to the beginning of the arc. # @param c [Array] # @param r [Float] # @param startAngle [Float] # @param endAngle [Float] # @param clockwise [true,false] # @return [void] def add_arc(*args) end # Adds an arc (of a circle with radius r) that is tangent to the line connecting current point and (x1, y1) and to the line connecting (x1, y1) and (x2, y2). # If the current point and the starting point of the arc are different, a straight line connecting these points is also appended. If there is no current point before the call to {Wx::GraphicsPath#add_arc_to_point} this function will behave as if preceded by a call to MoveToPoint(0, 0). After this call the current point will be at the ending point of the arc. # @param x1 [Float] # @param y1 [Float] # @param x2 [Float] # @param y2 [Float] # @param r [Float] # @return [void] def add_arc_to_point(x1, y1, x2, y2, r) end # Appends a circle around (x,y) with radius r as a new closed subpath. # After this call the current point will be at (x+r, y). # @param x [Float] # @param y [Float] # @param r [Float] # @return [void] def add_circle(x, y, r) end # @overload add_curve_to_point(cx1, cy1, cx2, cy2, x, y) # Adds a cubic bezier curve from the current point, using two control points and an end point. # If there is no current point before the call to {Wx::GraphicsPath#add_curve_to_point} this function will behave as if preceded by a call to MoveToPoint(cx1, cy1). # @param cx1 [Float] # @param cy1 [Float] # @param cx2 [Float] # @param cy2 [Float] # @param x [Float] # @param y [Float] # @return [void] # @overload add_curve_to_point(c1, c2, e) # Adds a cubic bezier curve from the current point, using two control points and an end point. # If there is no current point before the call to {Wx::GraphicsPath#add_curve_to_point} this function will behave as if preceded by a call to MoveToPoint(c1). # @param c1 [Array] # @param c2 [Array] # @param e [Array] # @return [void] def add_curve_to_point(*args) end # Appends an ellipse fitting into the passed in rectangle as a new closed subpath. # After this call the current point will be at (x+w, y+h/2). # @param x [Float] # @param y [Float] # @param w [Float] # @param h [Float] # @return [void] def add_ellipse(x, y, w, h) end # @overload add_line_to_point(x, y) # Adds a straight line from the current point to (x,y). # If current point is not yet set before the call to {Wx::GraphicsPath#add_line_to_point} this function will behave as {Wx::GraphicsPath#move_to_point}. # @param x [Float] # @param y [Float] # @return [void] # @overload add_line_to_point(p) # Adds a straight line from the current point to p. # If current point is not yet set before the call to {Wx::GraphicsPath#add_line_to_point} this function will behave as {Wx::GraphicsPath#move_to_point}. # @param p [Array] # @return [void] def add_line_to_point(*args) end # Adds another path onto the current path. # After this call the current point will be at the added path's current point. For Direct2D the path being appended shouldn't contain a started non-empty subpath when this function is called. # @param path [Wx::GraphicsPath] # @return [void] def add_path(path) end # Adds a quadratic bezier curve from the current point, using a control point and an end point. # If there is no current point before the call to {Wx::GraphicsPath#add_quad_curve_to_point} this function will behave as if preceded by a call to MoveToPoint(cx, cy). # @param cx [Float] # @param cy [Float] # @param x [Float] # @param y [Float] # @return [void] def add_quad_curve_to_point(cx, cy, x, y) end # Appends a rectangle as a new closed subpath. # After this call the current point will be at (x, y). # @param x [Float] # @param y [Float] # @param w [Float] # @param h [Float] # @return [void] def add_rectangle(x, y, w, h) end # Appends a rounded rectangle as a new closed subpath. # If radius equals 0 this function will behave as {Wx::GraphicsPath#add_rectangle}, otherwise after this call the current point will be at (x+w, y+h/2). # @param x [Float] # @param y [Float] # @param w [Float] # @param h [Float] # @param radius [Float] # @return [void] def add_rounded_rectangle(x, y, w, h, radius) end # Closes the current sub-path. # After this call the current point will be at the joined endpoint of the sub-path. # @return [void] def close_subpath; end # @overload contains(c, fillStyle=Wx::ODDEVEN_RULE) # # true if the point is within the path. # @param c [Array] # @param fillStyle [PolygonFillMode] # @return [true,false] # @overload contains(x, y, fillStyle=Wx::ODDEVEN_RULE) # # true if the point is within the path. # @param x [Float] # @param y [Float] # @param fillStyle [PolygonFillMode] # @return [true,false] def contains(*args) end # Gets the bounding box enclosing all points (possibly including control points). # @param x [Float] # @param y [Float] # @param w [Float] # @param h [Float] # @return [void] def get_box(x, y, w, h) end alias_method :box, :get_box # Gets the last point of the current path, (0,0) if not yet set. # @param x [Float] # @param y [Float] # @return [void] def get_current_point(x, y) end alias_method :current_point, :get_current_point # @overload move_to_point(x, y) # Begins a new subpath at (x,y). # @param x [Float] # @param y [Float] # @return [void] # @overload move_to_point(p) # Begins a new subpath at p. # @param p [Array] # @return [void] def move_to_point(*args) end # Transforms each point of this path by the matrix. # For Direct2D the current path shouldn't contain a started non-empty subpath when this function is called. # @param matrix [Wx::GraphicsMatrix] # @return [void] def transform(matrix) end end # GraphicsPath # A {Wx::GraphicsFont} is a native representation of a font. # The contents are specific and private to the respective renderer. Instances are ref counted and can therefore be assigned as usual. The only way to get a valid instance is via {Wx::GraphicsContext#create_font} or Wx::GraphicsRenderer#create_font. # === # # Category: Graphics Device Interface (GDI) # class GraphicsFont < GraphicsObject end # GraphicsFont # A {Wx::GraphicsMatrix} is a native representation of an affine matrix. # The contents are specific and private to the respective renderer. Instances are ref counted and can therefore be assigned as usual. The only way to get a valid instance is via {Wx::GraphicsContext#create_matrix} or Wx::GraphicsRenderer#create_matrix. # === # # Category: Graphics Device Interface (GDI) # class GraphicsMatrix < GraphicsObject # Concatenates the matrix passed with the current matrix. # The effect of the resulting transformation is to first apply the transformation in t to the coordinates and then apply the transformation in the current matrix to the coordinates. # # // matrix = t x matrix # @param t [Wx::GraphicsMatrix] The parameter matrix is the multiplicand. # @return [void] def concat(t) end # Returns the component values of the matrix via the argument pointers. # @return [Array(Float,Float,Float,Float,Float,Float)] def get; end # Inverts the matrix. # @return [void] def invert; end # Returns true if the elements of the transformation matrix are equal. # @param t [Wx::GraphicsMatrix] # @return [true,false] def is_equal(t) end alias_method :equal?, :is_equal # Return true if this is the identity matrix. # @return [true,false] def is_identity; end alias_method :identity?, :is_identity # Rotates this matrix clockwise (in radians). # @param angle [Float] Rotation angle in radians, clockwise. # @return [void] def rotate(angle) end # Scales this matrix. # @param xScale [Float] # @param yScale [Float] # @return [void] def scale(xScale, yScale) end # Sets the matrix to the respective values (default values are the identity matrix). # @param a [Float] # @param b [Float] # @param c [Float] # @param d [Float] # @param tx [Float] # @param ty [Float] # @return [void] def set(a=1.0, b=0.0, c=0.0, d=1.0, tx=0.0, ty=0.0) end # Applies this matrix to a distance (ie. # performs all transforms except translations). # @param dx [Float] # @param dy [Float] # @return [void] def transform_distance(dx, dy) end # Applies this matrix to a point. # @param x [Float] # @param y [Float] # @return [void] def transform_point(x, y) end # Translates this matrix. # @param dx [Float] # @param dy [Float] # @return [void] def translate(dx, dy) end end # GraphicsMatrix # Represents a bitmap. # The objects of this class are not created directly but only via {Wx::GraphicsContext} or {Wx::GraphicsRenderer} CreateBitmap(), CreateBitmapFromImage() or CreateSubBitmap() methods. They can subsequently be used with {Wx::GraphicsContext#draw_bitmap}. The only other operation is testing for the bitmap validity which can be performed using {Wx::GraphicsBitmap#is_null} method inherited from the base class. # class GraphicsBitmap < GraphicsObject # Default constructor creates an invalid bitmap. # @return [GraphicsBitmap] def initialize; end # Return the contents of this bitmap as {Wx::Image}. # Using this method is more efficient than converting {Wx::GraphicsBitmap} to {Wx::Bitmap} first and then to {Wx::Image} and can be useful if, for example, you want to save {Wx::GraphicsBitmap} as a disk file in a format not directly supported by {Wx::Bitmap}. # Invalid image is returned if the bitmap is invalid. # @return [Wx::Image] def convert_to_image; end end # GraphicsBitmap end