# :stopdoc:
# This file is automatically generated by the WXRuby3 documentation
# generator. Do not alter this file.
# :startdoc:
module Wx
# The possible brush styles.
#
#
#
class BrushStyle < Wx::Enum
#
#
BRUSHSTYLE_INVALID = Wx::BrushStyle.new(-1)
# Solid.
#
BRUSHSTYLE_SOLID = Wx::BrushStyle.new(100)
# Transparent (no fill).
#
BRUSHSTYLE_TRANSPARENT = Wx::BrushStyle.new(106)
# Uses a bitmap as a stipple; the mask is used for blitting monochrome using text foreground and background colors.
#
BRUSHSTYLE_STIPPLE_MASK_OPAQUE = Wx::BrushStyle.new(107)
# Uses a bitmap as a stipple; mask is used for masking areas in the stipple bitmap.
#
BRUSHSTYLE_STIPPLE_MASK = Wx::BrushStyle.new(108)
# Uses a bitmap as a stipple.
#
BRUSHSTYLE_STIPPLE = Wx::BrushStyle.new(110)
# Backward diagonal hatch.
#
BRUSHSTYLE_BDIAGONAL_HATCH = Wx::BrushStyle.new(111)
# Cross-diagonal hatch.
#
BRUSHSTYLE_CROSSDIAG_HATCH = Wx::BrushStyle.new(112)
# Forward diagonal hatch.
#
BRUSHSTYLE_FDIAGONAL_HATCH = Wx::BrushStyle.new(113)
# Cross hatch.
#
BRUSHSTYLE_CROSS_HATCH = Wx::BrushStyle.new(114)
# Horizontal hatch.
#
BRUSHSTYLE_HORIZONTAL_HATCH = Wx::BrushStyle.new(115)
# Vertical hatch.
#
BRUSHSTYLE_VERTICAL_HATCH = Wx::BrushStyle.new(116)
# First of the hatch styles (inclusive).
#
BRUSHSTYLE_FIRST_HATCH = Wx::BrushStyle.new(111)
# Last of the hatch styles (inclusive).
#
BRUSHSTYLE_LAST_HATCH = Wx::BrushStyle.new(116)
end # BrushStyle
# An empty brush.
#
NULL_BRUSH = nil
# A brush is a drawing tool for filling in areas.
#
# It is used for painting the background of rectangles, ellipses, etc. It has a colour and a style.
# On a monochrome display, wxWidgets shows all brushes as white unless the colour is really black.
# Do not initialize objects on the stack before the program commences, since other required structures may not have been set up yet. Instead, define global pointers to objects and create them in {Wx::App::OnInit} or when required.
# An application may wish to create brushes with different characteristics dynamically, and there is the consequent danger that a large number of duplicate brushes will be created. Therefore an application may wish to get a pointer to a brush by using the global list of brushes {Wx::TheBrushList}, and calling the member function Wx::BrushList#find_or_create_brush.
# This class uses reference counting and copy-on-write internally so that assignments between two instances of this class are very cheap. You can therefore use actual objects instead of pointers without efficiency problems. If an instance of this class is changed it will create its own data internally so that other instances, which previously shared the data using the reference counting, are not affected.
#
# Category: Graphics Device Interface (GDI)
# Predefined objects/pointers:
#
# - {Wx::NULL_BRUSH}
#
# - {Wx::BLACK_BRUSH}
#
# - {Wx::BLUE_BRUSH}
#
# - {Wx::CYAN_BRUSH}
#
# - {Wx::GREEN_BRUSH}
#
# - {Wx::YELLOW_BRUSH}
#
# - {Wx::GREY_BRUSH}
#
# - {Wx::LIGHT_GREY_BRUSH}
#
# - {Wx::MEDIUM_GREY_BRUSH}
#
# - {Wx::RED_BRUSH}
#
# - {Wx::TRANSPARENT_BRUSH}
#
# - {Wx::WHITE_BRUSH}
# @see Wx::BrushList
# @see Wx::DC
# @see Wx::DC#set_brush
#
#
#
# @note This class is untracked and should not be derived from nor instances extended!
class Brush < GDIObject
# @overload set_colour(colour)
# Sets the brush colour using red, green and blue values.
#
#
# @see Wx::Brush#get_colour
# @param colour [Wx::Colour,String,Symbol]
# @return [void]
# @overload set_colour(red, green, blue)
# Sets the brush colour using red, green and blue values.
#
#
# @see Wx::Brush#get_colour
# @param red [Integer]
# @param green [Integer]
# @param blue [Integer]
# @return [void]
def set_colour(*args) end
alias_method :colour=, :set_colour
# @overload initialize()
# Default constructor.
#
# The brush will be uninitialised, and {Wx::Brush}:{Wx::Brush#is_ok} will return false.
# @return [Wx::Brush]
# @overload initialize(colour, style=Wx::BrushStyle::BRUSHSTYLE_SOLID)
# Constructs a brush from a colour object and style.
# @param colour [Wx::Colour,String,Symbol] Colour object.
# @param style [Wx::BrushStyle] One of the {Wx::BrushStyle} enumeration values.
# @return [Wx::Brush]
# @overload initialize(stippleBitmap)
# Constructs a stippled brush using a bitmap.
#
# The brush style will be set to {Wx::BrushStyle::BRUSHSTYLE_STIPPLE}.
# @param stippleBitmap [Wx::Bitmap]
# @return [Wx::Brush]
# @overload initialize(brush)
# Copy constructor, uses reference counting.
# @param brush [Wx::Brush]
# @return [Wx::Brush]
def initialize(*args) end
# Returns a reference to the brush colour.
#
#
# @see Wx::Brush#set_colour
# @return [Wx::Colour]
def get_colour; end
alias_method :colour, :get_colour
# Gets a pointer to the stipple bitmap.
#
# If the brush does not have a {Wx::BrushStyle::BRUSHSTYLE_STIPPLE} style, this bitmap may be non-NULL but uninitialised (i.e. {Wx::Bitmap}:{Wx::Brush#is_ok} returns false).
# @see Wx::Brush#set_stipple
# @return [Wx::Bitmap]
def get_stipple; end
alias_method :stipple, :get_stipple
# Returns the brush style, one of the {Wx::BrushStyle} values.
#
#
# @see Wx::Brush#set_style
# @see Wx::Brush#set_colour
# @see Wx::Brush#set_stipple
# @return [Wx::BrushStyle]
def get_style; end
alias_method :style, :get_style
# Returns true if the style of the brush is any of hatched fills.
#
#
# @see Wx::Brush#get_style
# @return [Boolean]
def is_hatch; end
alias_method :hatch?, :is_hatch
# Returns true if the brush is initialised.
#
# Notice that an uninitialized brush object can't be queried for any brush properties and all calls to the accessor methods on it will result in an assert failure.
# @return [Boolean]
def is_ok; end
alias_method :ok?, :is_ok
# Returns true if the brush is a valid non-transparent brush.
#
# This method returns true if the brush object is initialized and has a non-transparent style. Notice that this should be used instead of simply testing whether {Wx::Brush#get_style} returns a style different from {Wx::BrushStyle::BRUSHSTYLE_TRANSPARENT} if the brush may be invalid as {Wx::Brush#get_style} would assert in this case.
# @see Wx::Brush#is_transparent
# @return [Boolean]
def is_non_transparent; end
alias_method :non_transparent?, :is_non_transparent
# Returns true if the brush is transparent.
#
# A transparent brush is simply a brush with {Wx::BrushStyle::BRUSHSTYLE_TRANSPARENT} style.
# Notice that this function works even for non-initialized brushes (for which it returns false) unlike tests of the form Wx::Brush#get_style == wxBRUSHSTYLE_TRANSPARENT
which would assert if the brush is invalid.
# @see Wx::Brush#is_non_transparent
# @return [Boolean]
def is_transparent; end
alias_method :transparent?, :is_transparent
# Sets the stipple bitmap.
#
#
The style will be set to {Wx::BrushStyle::BRUSHSTYLE_STIPPLE}, unless the bitmap has a mask associated to it, in which case the style will be set to {Wx::BrushStyle::BRUSHSTYLE_STIPPLE_MASK_OPAQUE}. #
#