# :stopdoc: # This file is automatically generated by the WXRuby3 documentation # generator. Do not alter this file. # :startdoc: module Wx # The possible styles for a {Wx::Pen}. # # Note that hatched pen styles are not supported by X11-based ports, including WXGTK. # class PenStyle < Wx::Enum # # PENSTYLE_INVALID = Wx::PenStyle.new(-1) # Solid style. # PENSTYLE_SOLID = Wx::PenStyle.new(100) # Dotted style. # PENSTYLE_DOT = Wx::PenStyle.new(101) # Long dashed style. # PENSTYLE_LONG_DASH = Wx::PenStyle.new(102) # Short dashed style. # PENSTYLE_SHORT_DASH = Wx::PenStyle.new(103) # Dot and dash style. # PENSTYLE_DOT_DASH = Wx::PenStyle.new(104) # Use the user dashes: see {Wx::Pen#set_dashes}. # PENSTYLE_USER_DASH = Wx::PenStyle.new(105) # No pen is used. # PENSTYLE_TRANSPARENT = Wx::PenStyle.new(106) # # PENSTYLE_STIPPLE_MASK_OPAQUE = Wx::PenStyle.new(107) # # PENSTYLE_STIPPLE_MASK = Wx::PenStyle.new(108) # Use the stipple bitmap. # PENSTYLE_STIPPLE = Wx::PenStyle.new(110) # Backward diagonal hatch. # PENSTYLE_BDIAGONAL_HATCH = Wx::PenStyle.new(111) # Cross-diagonal hatch. # PENSTYLE_CROSSDIAG_HATCH = Wx::PenStyle.new(112) # Forward diagonal hatch. # PENSTYLE_FDIAGONAL_HATCH = Wx::PenStyle.new(113) # Cross hatch. # PENSTYLE_CROSS_HATCH = Wx::PenStyle.new(114) # Horizontal hatch. # PENSTYLE_HORIZONTAL_HATCH = Wx::PenStyle.new(115) # Vertical hatch. # PENSTYLE_VERTICAL_HATCH = Wx::PenStyle.new(116) # First of the hatch styles (inclusive). # PENSTYLE_FIRST_HATCH = Wx::PenStyle.new(111) # Last of the hatch styles (inclusive). # PENSTYLE_LAST_HATCH = Wx::PenStyle.new(116) end # PenStyle # Possible values for pen quality. # # Pen quality is currently only used in WXMSW, the other ports ignore it and always use the same default pen quality. # In WXMSW the choice of quality affects whether "cosmetic" or "geometric" native pens are used in situations when both are usable. Notably, for dotted and dashed pens of width 1, high quality geometric pens are used by default since wxWidgets 3.1.4, while previous versions used lower quality but much faster cosmetic pens. If drawing performance is more important than the exact appearance of the lines drawn using this pen, low quality may be explicitly selected. # See {Wx::PenInfo#quality} and {Wx::Pen#set_quality}. # class PenQuality < Wx::Enum # Select the appropriate quality automatically. # PEN_QUALITY_DEFAULT = Wx::PenQuality.new(0) # Less good looking but faster. # PEN_QUALITY_LOW = Wx::PenQuality.new(1) # Best looking, at the expense of speed. # PEN_QUALITY_HIGH = Wx::PenQuality.new(2) end # PenQuality # The possible join values of a {Wx::Pen}. # # Todouse {Wx::PENJOIN_} prefix # class PenJoin < Wx::Enum # # JOIN_INVALID = Wx::PenJoin.new(-1) # # JOIN_BEVEL = Wx::PenJoin.new(120) # # JOIN_MITER = Wx::PenJoin.new(121) # # JOIN_ROUND = Wx::PenJoin.new(122) end # PenJoin # The possible cap values of a {Wx::Pen}. # # Todouse {Wx::PENCAP_} prefix # class PenCap < Wx::Enum # # CAP_INVALID = Wx::PenCap.new(-1) # # CAP_ROUND = Wx::PenCap.new(130) # # CAP_PROJECTING = Wx::PenCap.new(131) # # CAP_BUTT = Wx::PenCap.new(132) end # PenCap # An empty pen. # NULL_PEN = nil # A pen is a drawing tool for drawing outlines. # # It is used for drawing lines and painting the outline of rectangles, ellipses, etc. It has a colour, a width and a style. # #
On a monochrome display, wxWidgets shows all non-white pens as black. #
#Different versions of Windows and different versions of other platforms support very different subsets of the styles above so handle with care. #
#Wx::Pen#get_style == wxPENSTYLE_TRANSPARENT
which would assert if the pen is invalid.
# @see Wx::Pen#is_non_transparent
# @return [Boolean]
def is_transparent; end
alias_method :transparent?, :is_transparent
# Sets the pen cap style, which may be one of {Wx::PenCap::CAP_ROUND}, {Wx::PenCap::CAP_PROJECTING} and {Wx::PenCap::CAP_BUTT}.
#
# The default is {Wx::PenCap::CAP_ROUND}.
# @see Wx::Pen#get_cap
# @param capStyle [Wx::PenCap]
# @return [void]
def set_cap(capStyle) end
alias_method :cap=, :set_cap
# Sets the pen quality.
#
# Explicitly selecting low pen quality may be useful in WXMSW if drawing performance is more important than the exact appearance of the lines drawn with this pen.
# @see Wx::PenQuality
# @param quality [Wx::PenQuality]
# @return [void]
def set_quality(quality) end
alias_method :quality=, :set_quality
# Associates an array of dash values (defined as char in X, DWORD under Windows) with the pen.
#
# The array is not deallocated by {Wx::Pen}, but neither must it be deallocated by the calling application until the pen is deleted or this function is called with a NULL array.
# @see Wx::Pen#get_dashes
# @param n [Integer]
# @param dash [Wx::Dash]
# @return [void]
def set_dashes(n, dash) end
# Sets the pen join style, which may be one of {Wx::PenJoin::JOIN_BEVEL}, {Wx::PenJoin::JOIN_ROUND} and {Wx::PenJoin::JOIN_MITER}.
#
# The default is {Wx::PenJoin::JOIN_ROUND}.
# @see Wx::Pen#get_join
# @param join_style [Wx::PenJoin]
# @return [void]
def set_join(join_style) end
alias_method :join=, :set_join
# Sets the bitmap for stippling.
#
#
# @see Wx::Pen#get_stipple
# @param stipple [Wx::Bitmap]
# @return [void]
def set_stipple(stipple) end
alias_method :stipple=, :set_stipple
# Set the pen style.
#
#
# @see Wx::Pen#initialize
# @param style [Wx::PenStyle]
# @return [void]
def set_style(style) end
alias_method :style=, :set_style
# Sets the pen width.
#
#
# @see Wx::Pen#get_width
# @param width [Integer]
# @return [void]
def set_width(width) end
alias_method :width=, :set_width
# Equality operator.
#
# See reference-counted object comparison for more info.
# @param pen [Wx::Pen]
# @return [Boolean]
def ==(pen) end
end # Pen
# This class is a helper used for {Wx::Pen} creation using named parameter idiom: it allows specifying various {Wx::Pen} attributes using the chained calls to its clearly named methods instead of passing them in the fixed order to {Wx::Pen} constructors.
#
# For instance, to create a dotted blue pen with the given join style you could do
# ```ruby
# pen = Wx::Pen.new(Wx::PenInfo.new(Wx::BLUE).style(Wx::PENSTYLE_DOT).join(Wx::JOIN_BEVEL))
# ```
#
#
# @note This class is untracked and should not be derived from nor instances extended!
class PenInfo < ::Object
# @param colour [Wx::Colour,String,Symbol]
# @param width [Integer]
# @param style [Wx::PenStyle]
# @return [Wx::PenInfo]
def initialize(colour=(Wx::Colour.new()), width=1, style=Wx::PenStyle::PENSTYLE_SOLID) end
# @param col [Wx::Colour,String,Symbol]
# @return [Wx::PenInfo]
def colour(col) end
# @param width [Integer]
# @return [Wx::PenInfo]
def width(width) end
# @param style [Wx::PenStyle]
# @return [Wx::PenInfo]
def style(style) end
# @param stipple [Wx::Bitmap]
# @return [Wx::PenInfo]
def stipple(stipple) end
# @param nb_dashes [Integer]
# @param dash [Wx::Dash]
# @return [Wx::PenInfo]
def dashes(nb_dashes, dash) end
# @param join [Wx::PenJoin]
# @return [Wx::PenInfo]
def join(join) end
# @param cap [Wx::PenCap]
# @return [Wx::PenInfo]
def cap(cap) end
# Set the pen quality.
#
# Using {Wx::PenInfo#low_quality} or {Wx::PenInfo#high_quality} is usually more convenient.
# @see Wx::Pen#set_quality
# @param quality [Wx::PenQuality]
# @return [Wx::PenInfo]
def quality(quality) end
# Set low pen quality.
#
# This is the same as calling {Wx::PenInfo#quality} with {Wx::PenQuality::PEN_QUALITY_LOW}.
# @return [Wx::PenInfo]
def low_quality; end
# Set high pen quality.
#
# This is the same as calling {Wx::PenInfo#quality} with {Wx::PenQuality::PEN_QUALITY_HIGH}.
# @return [Wx::PenInfo]
def high_quality; 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
# @return [Wx::PenQuality]
def get_quality; 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 [Integer]
def get_width; end
end # PenInfo
end