VectSharp 2.5.0
A light library for C# vector graphics
Loading...
Searching...
No Matches
VectSharp.LinearGradientBrush Class Reference

Represents a brush painting with a linear gradient. More...

Inheritance diagram for VectSharp.LinearGradientBrush:

Public Member Functions

 LinearGradientBrush (Point startPoint, Point endPoint, IEnumerable< GradientStop > gradientStops)
 Creates a new LinearGradientBrush with the specified start point, end point and gradient stops. More...
 
 LinearGradientBrush (Point startPoint, Point endPoint, params GradientStop[] gradientStops)
 Creates a new LinearGradientBrush with the specified start point, end point and gradient stops. More...
 
LinearGradientBrush RelativeTo (Graphics referenceGraphics)
 Returns a LinearGradientBrush with the same gradient stops as the current instance, whose start and end point correspond to the points of the current instance in the original reference frame of the referenceGraphics . This involves computing the current transform matrix of the referenceGraphics , inverting it, and applying the inverse matrix to the StartPoint and EndPoint of the current instance. More...
 
override Brush MultiplyOpacity (double opacity)
 Returns a brush corresponding the current instance, with the specified opacity multiplication applied.
Parameters
opacityThe value that will be used to multiply the opacity of the brush.
Returns
A brush corresponding the current instance, with the specified opacity multiplication applied.
More...
 
abstract Brush MultiplyOpacity (double opacity)
 Returns a brush corresponding the current instance, with the specified opacity multiplication applied. More...
 

Properties

Point StartPoint [get]
 The starting point of the gradient. Note that this is relative to the current coordinate system when the gradient is used. More...
 
Point EndPoint [get]
 The end point of the gradient. Note that this is relative to the current coordinate system when the gradient is used. More...
 
- Properties inherited from VectSharp.GradientBrush
GradientStops GradientStops [get]
 The colour stops in the gradient. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from VectSharp.Brush
static implicit operator Brush (Colour colour)
 Implicitly converts a Colour into a SolidColourBrush. More...
 

Detailed Description

Represents a brush painting with a linear gradient.

Definition at line 283 of file Brush.cs.

Constructor & Destructor Documentation

◆ LinearGradientBrush() [1/2]

VectSharp.LinearGradientBrush.LinearGradientBrush ( Point  startPoint,
Point  endPoint,
IEnumerable< GradientStop gradientStops 
)

Creates a new LinearGradientBrush with the specified start point, end point and gradient stops.

Parameters
startPointThe starting point of the gradient. Note that this is relative to the current coordinate system when the gradient is used.
endPointThe ending point of the gradient. Note that this is relative to the current coordinate system when the gradient is used.
gradientStopsThe colour stops in the gradient.

Definition at line 301 of file Brush.cs.

◆ LinearGradientBrush() [2/2]

VectSharp.LinearGradientBrush.LinearGradientBrush ( Point  startPoint,
Point  endPoint,
params GradientStop[]  gradientStops 
)

Creates a new LinearGradientBrush with the specified start point, end point and gradient stops.

Parameters
startPointThe starting point of the gradient. Note that this is relative to the current coordinate system when the gradient is used.
endPointThe ending point of the gradient. Note that this is relative to the current coordinate system when the gradient is used.
gradientStopsThe colour stops in the gradient.

Definition at line 315 of file Brush.cs.

Member Function Documentation

◆ MultiplyOpacity()

override Brush VectSharp.LinearGradientBrush.MultiplyOpacity ( double  opacity)
virtual

Returns a brush corresponding the current instance, with the specified opacity multiplication applied.

Parameters
opacityThe value that will be used to multiply the opacity of the brush.
Returns
A brush corresponding the current instance, with the specified opacity multiplication applied.

Implements VectSharp.Brush.

Definition at line 397 of file Brush.cs.

◆ RelativeTo()

LinearGradientBrush VectSharp.LinearGradientBrush.RelativeTo ( Graphics  referenceGraphics)

Returns a LinearGradientBrush with the same gradient stops as the current instance, whose start and end point correspond to the points of the current instance in the original reference frame of the referenceGraphics . This involves computing the current transform matrix of the referenceGraphics , inverting it, and applying the inverse matrix to the StartPoint and EndPoint of the current instance.

Parameters
referenceGraphicsThe Graphics whose original reference frame is to be used.
Returns
A LinearGradientBrush with the same gradient stops as the current instance, whose start and end point correspond to the points of the current instance in the original reference frame of the referenceGraphics .

Definition at line 347 of file Brush.cs.

Property Documentation

◆ EndPoint

Point VectSharp.LinearGradientBrush.EndPoint
get

The end point of the gradient. Note that this is relative to the current coordinate system when the gradient is used.

Definition at line 293 of file Brush.cs.

◆ StartPoint

Point VectSharp.LinearGradientBrush.StartPoint
get

The starting point of the gradient. Note that this is relative to the current coordinate system when the gradient is used.

Definition at line 288 of file Brush.cs.


The documentation for this class was generated from the following file: