Jump to content

VBrush: Difference between revisions

From EDM2
Created page with "A class to specify the brush used to fill shapes. ==Synopsis== ; '''Header:''' : <tt>[vquickr.htm#vBrush <v/vbrush.h>]</tt> ; '''Class name:''' : vBrush ==Description== Brush..."
 
Ak120 (talk | contribs)
mNo edit summary
 
(2 intermediate revisions by the same user not shown)
Line 2: Line 2:


==Synopsis==
==Synopsis==
 
;Header: <tt>[vquickr.htm#vBrush <v/vbrush.h>]</tt>
; '''Header:'''
;Class name: vBrush
: <tt>[vquickr.htm#vBrush <v/vbrush.h>]</tt>
; '''Class name:'''
: vBrush


==Description==
==Description==
Brushes are used to fill shapes. Brushes have two attributes, including color and style.
Brushes are used to fill shapes. Brushes have two attributes, including color and style.


==Methods==
==Methods==
 
;vBrush(unsigned int r = 0, unsigned int g = 0, unsigned int b = 0, int style = vSolid):
====vBrush(unsigned int r = 0, unsigned int g = 0, unsigned int b = 0, int style = vSolid)====
 
The brush constructor allows you to set the initial color and style of the brush. The default constructs a solid black brush.
The brush constructor allows you to set the initial color and style of the brush. The default constructs a solid black brush.
;int operator == , !:You can use the operators <tt><nowiki>==</nowiki></tt> and <tt><nowiki>!=</nowiki></tt> for comparisons.
;vColor GetColor():This method returns the current color of the brush as a <tt>vColor</tt> object.
;int GetFillMode():This method returns the fill mode of the brush (either <tt>vAlternate</tt> or <tt>vWinding</tt>).
;int GetStyle():This method returns the current style of the brush.
;void SetColor(vColor& c):You can use this method to set the brush color by passing in a <tt>vColor</tt> object.
;int SetFillMode(int fillMode):This method sets the fill mode of the brush. The fillMode parameter specifies one of two alternative filling algorithms, <tt>vAlternate</tt> or <tt>vWinding</tt>. These algorithms correspond to the equivalent algorithms on the native platforms.
;void SetStyle(int style):This method is used to set the style of the brush. Brush styles include:
:;vSolid: The brush fills with a solid color.
:;vTransparent: The brush is transparent, which allows you to draw unfilled shapes.
:;vHorizontalHatch: The brush fills with a horizontal hatch pattern in the current color.
:;vVerticleHatch: The brush fills with a vertical hatch pattern.
:;vLeftDiagonalHatch: The brush fills with a left leaning diagonal hatch pattern.
:;vRightDiagonalHatch: The brush fills with a right leaning diagonal hatch pattern.
:;vCrossHatch: The brush fills with a vertical and horizontal cross hatch pattern.
:;vDiagonalCrossHatch: The brush fills with a diagonal cross hatch pattern.


====int operator == , !=====
[[Category:V C++ GUI Framework]]
 
You can use the operators <tt><nowiki>==</nowiki></tt> and <tt><nowiki>!=</nowiki></tt> for comparisons.
 
====vColor GetColor()====
 
This method returns the current color of the brush as a <tt>vColor</tt> object.
 
====int GetFillMode()====
 
This method returns the fill mode of the brush (either <tt>vAlternate</tt> or <tt>vWinding</tt>).
 
====int GetStyle()====
 
This method returns the current style of the brush.
 
====void SetColor(vColor& c)====
 
You can use this method to set the brush color by passing in a <tt>vColor</tt> object.
 
====int SetFillMode(int fillMode)====
 
This method sets the fill mode of the brush. The fillMode parameter specifies one of two alternative filling algorithms, <tt>vAlternate</tt> or <tt>vWinding</tt>. These algorithms correspond to the equivalent algorithms on the native platforms.
 
====void SetStyle(int style)====
 
This method is used to set the style of the brush. Brush styles include:
 
; '''vSolid'''
: The brush fills with a solid color.
; '''vTransparent'''
: The brush is transparent, which allows you to draw unfilled shapes.
; '''vHorizontalHatch'''
: The brush fills with a horizontal hatch pattern in the current color.
; '''vVerticleHatch'''
: The brush fills with a vertical hatch pattern.
; '''vLeftDiagonalHatch'''
: The brush fills with a left leaning diagonal hatch pattern.
; '''vRightDiagonalHatch'''
: The brush fills with a right leaning diagonal hatch pattern.
; '''vCrossHatch'''
: The brush fills with a vertical and horizontal cross hatch pattern.
; '''vDiagonalCrossHatch'''
: The brush fills with a diagonal cross hatch pattern.
 
[[Category:Tools Articles]]

Latest revision as of 22:02, 9 April 2020

A class to specify the brush used to fill shapes.

Synopsis

Header
[vquickr.htm#vBrush <v/vbrush.h>]
Class name
vBrush

Description

Brushes are used to fill shapes. Brushes have two attributes, including color and style.

Methods

vBrush(unsigned int r = 0, unsigned int g = 0, unsigned int b = 0, int style = vSolid)

The brush constructor allows you to set the initial color and style of the brush. The default constructs a solid black brush.

int operator == , !
You can use the operators == and != for comparisons.
vColor GetColor()
This method returns the current color of the brush as a vColor object.
int GetFillMode()
This method returns the fill mode of the brush (either vAlternate or vWinding).
int GetStyle()
This method returns the current style of the brush.
void SetColor(vColor& c)
You can use this method to set the brush color by passing in a vColor object.
int SetFillMode(int fillMode)
This method sets the fill mode of the brush. The fillMode parameter specifies one of two alternative filling algorithms, vAlternate or vWinding. These algorithms correspond to the equivalent algorithms on the native platforms.
void SetStyle(int style)
This method is used to set the style of the brush. Brush styles include:
vSolid
The brush fills with a solid color.
vTransparent
The brush is transparent, which allows you to draw unfilled shapes.
vHorizontalHatch
The brush fills with a horizontal hatch pattern in the current color.
vVerticleHatch
The brush fills with a vertical hatch pattern.
vLeftDiagonalHatch
The brush fills with a left leaning diagonal hatch pattern.
vRightDiagonalHatch
The brush fills with a right leaning diagonal hatch pattern.
vCrossHatch
The brush fills with a vertical and horizontal cross hatch pattern.
vDiagonalCrossHatch
The brush fills with a diagonal cross hatch pattern.