ReactOS 0.4.15-dev-6068-g8061a6f
LinearGradientBrush Class Reference

#include <gdiplusbrush.h>

Inheritance diagram for LinearGradientBrush:
Collaboration diagram for LinearGradientBrush:

Public Member Functions

 LinearGradientBrush (const PointF &point1, const PointF &point2, const Color &color1, const Color &color2)
 
 LinearGradientBrush (const Rect &rect, const Color &color1, const Color &color2, REAL angle, BOOL isAngleScalable=FALSE)
 
 LinearGradientBrush (const Rect &rect, const Color &color1, const Color &color2, LinearGradientMode mode)
 
 LinearGradientBrush (const Point &point1, const Point &point2, const Color &color1, const Color &color2)
 
 LinearGradientBrush (const RectF &rect, const Color &color1, const Color &color2, REAL angle, BOOL isAngleScalable=FALSE)
 
 LinearGradientBrush (const RectF &rect, const Color &color1, const Color &color2, LinearGradientMode mode)
 
Status GetBlend (REAL *blendFactors, REAL *blendPositions, INT count)
 
INT GetBlendCount () const
 
BOOL GetGammaCorrection () const
 
INT GetInterpolationColorCount () const
 
Status GetInterpolationColors (Color *presetColors, REAL *blendPositions, INT count) const
 
Status GetLinearColors (Color *colors) const
 
Status GetRectangle (Rect *rect) const
 
Status GetRectangle (RectF *rect) const
 
Status GetTransform (Matrix *matrix) const
 
WrapMode GetWrapMode () const
 
Status MultiplyTransform (const Matrix *matrix, MatrixOrder order)
 
Status ResetTransform ()
 
Status RotateTransform (REAL angle, MatrixOrder order)
 
Status ScaleTransform (REAL sx, REAL sy, MatrixOrder order=MatrixOrderPrepend)
 
Status SetBlend (const REAL *blendFactors, const REAL *blendPositions, INT count)
 
Status SetBlendBellShape (REAL focus, REAL scale)
 
Status SetBlendTriangularShape (REAL focus, REAL scale=1.0f)
 
Status SetGammaCorrection (BOOL useGammaCorrection)
 
Status SetInterpolationColors (const Color *presetColors, const REAL *blendPositions, INT count)
 
Status SetLinearColors (const Color &color1, const Color &color2)
 
Status SetTransform (const Matrix *matrix)
 
Status SetWrapMode (WrapMode wrapMode)
 
Status TranslateTransform (REAL dx, REAL dy, MatrixOrder order=MatrixOrderPrepend)
 
Status SetLinearPoints (const PointF &point1, const PointF &point2)
 
Status GetLinearPoints (PointF *points) const
 
Status SetLinearPoints (const Point &point1, const Point &point2)
 
Status GetLinearPoints (Point *points) const
 
- Public Member Functions inherited from Brush
virtual ~Brush ()
 
BrushClone () const
 
Status GetLastStatus () const
 
BrushType GetType () const
 
- Public Member Functions inherited from GdiplusBase
void operator delete (void *in_pVoid)
 
void operator delete[] (void *in_pVoid)
 
voidoperator new (size_t in_size)
 
voidoperator new[] (size_t in_size)
 

Protected Member Functions

GpLineGradientGetNativeGradient () const
 
- Protected Member Functions inherited from Brush
 Brush ()
 
 Brush (GpBrush *brush, Status status)
 
Status SetStatus (Status status) const
 
void SetNativeBrush (GpBrush *brush)
 

Friends

class Pen
 

Additional Inherited Members

- Protected Attributes inherited from Brush
GpBrushnativeBrush
 
Status lastStatus
 

Detailed Description

Definition at line 164 of file gdiplusbrush.h.

Constructor & Destructor Documentation

◆ LinearGradientBrush() [1/6]

LinearGradientBrush::LinearGradientBrush ( const PointF point1,
const PointF point2,
const Color color1,
const Color color2 
)
inline

Definition at line 169 of file gdiplusbrush.h.

170 {
171 GpLineGradient *brush = NULL;
172 lastStatus = DllExports::GdipCreateLineBrush(
173 &point1, &point2, color1.GetValue(), color2.GetValue(), WrapModeTile, &brush);
174 SetNativeBrush(brush);
175 }
Status lastStatus
Definition: gdiplusbrush.h:65
void SetNativeBrush(GpBrush *brush)
Definition: gdiplusbrush.h:84
#define NULL
Definition: types.h:112
@ WrapModeTile
Definition: gdiplusenums.h:207

◆ LinearGradientBrush() [2/6]

LinearGradientBrush::LinearGradientBrush ( const Rect rect,
const Color color1,
const Color color2,
REAL  angle,
BOOL  isAngleScalable = FALSE 
)
inline

Definition at line 177 of file gdiplusbrush.h.

183 {
184 GpLineGradient *brush = NULL;
185 lastStatus = DllExports::GdipCreateLineBrushFromRectWithAngleI(
186 &rect, color1.GetValue(), color2.GetValue(), angle, isAngleScalable, WrapModeTile, &brush);
187 SetNativeBrush(brush);
188 }
GLfloat angle
Definition: glext.h:10853
& rect
Definition: startmenu.cpp:1413

◆ LinearGradientBrush() [3/6]

LinearGradientBrush::LinearGradientBrush ( const Rect rect,
const Color color1,
const Color color2,
LinearGradientMode  mode 
)
inline

Definition at line 190 of file gdiplusbrush.h.

191 {
192 GpLineGradient *brush = NULL;
193 lastStatus = DllExports::GdipCreateLineBrushFromRectI(
194 &rect, color1.GetValue(), color2.GetValue(), mode, WrapModeTile, &brush);
195 SetNativeBrush(brush);
196 }
GLenum mode
Definition: glext.h:6217

◆ LinearGradientBrush() [4/6]

LinearGradientBrush::LinearGradientBrush ( const Point point1,
const Point point2,
const Color color1,
const Color color2 
)
inline

Definition at line 198 of file gdiplusbrush.h.

199 {
200 GpLineGradient *brush = NULL;
201 lastStatus = DllExports::GdipCreateLineBrushI(
202 &point1, &point2, color1.GetValue(), color2.GetValue(), WrapModeTile, &brush);
203 SetNativeBrush(brush);
204 }

◆ LinearGradientBrush() [5/6]

LinearGradientBrush::LinearGradientBrush ( const RectF rect,
const Color color1,
const Color color2,
REAL  angle,
BOOL  isAngleScalable = FALSE 
)
inline

Definition at line 206 of file gdiplusbrush.h.

212 {
213 GpLineGradient *brush = NULL;
214 lastStatus = DllExports::GdipCreateLineBrushFromRectWithAngle(
215 &rect, color1.GetValue(), color2.GetValue(), angle, isAngleScalable, WrapModeTile, &brush);
216 SetNativeBrush(brush);
217 }

◆ LinearGradientBrush() [6/6]

LinearGradientBrush::LinearGradientBrush ( const RectF rect,
const Color color1,
const Color color2,
LinearGradientMode  mode 
)
inline

Definition at line 219 of file gdiplusbrush.h.

220 {
221 GpLineGradient *brush = NULL;
222 lastStatus = DllExports::GdipCreateLineBrushFromRect(
223 &rect, color1.GetValue(), color2.GetValue(), mode, WrapModeTile, &brush);
224 SetNativeBrush(brush);
225 }

Member Function Documentation

◆ GetBlend()

Status LinearGradientBrush::GetBlend ( REAL blendFactors,
REAL blendPositions,
INT  count 
)
inline

Definition at line 228 of file gdiplusbrush.h.

229 {
230 GpLineGradient *gradient = GetNativeGradient();
231 return SetStatus(DllExports::GdipGetLineBlend(gradient, blendFactors, blendPositions, count));
232 }
Status SetStatus(Status status) const
Definition: gdiplusbrush.h:76
GpLineGradient * GetNativeGradient() const
Definition: gdiplusbrush.h:452
GLuint GLuint GLsizei count
Definition: gl.h:1545

◆ GetBlendCount()

INT LinearGradientBrush::GetBlendCount ( ) const
inline

Definition at line 235 of file gdiplusbrush.h.

236 {
237 INT count = 0;
238 GpLineGradient *gradient = GetNativeGradient();
239 SetStatus(DllExports::GdipGetLineBlendCount(gradient, &count));
240 return count;
241 }
int32_t INT
Definition: typedefs.h:58

◆ GetGammaCorrection()

BOOL LinearGradientBrush::GetGammaCorrection ( ) const
inline

Definition at line 244 of file gdiplusbrush.h.

245 {
246 BOOL useGammaCorrection;
247 GpLineGradient *gradient = GetNativeGradient();
248 SetStatus(DllExports::GdipGetLineGammaCorrection(gradient, &useGammaCorrection));
249 return useGammaCorrection;
250 }
unsigned int BOOL
Definition: ntddk_ex.h:94

◆ GetInterpolationColorCount()

INT LinearGradientBrush::GetInterpolationColorCount ( ) const
inline

Definition at line 253 of file gdiplusbrush.h.

254 {
255 INT count = 0;
256 GpLineGradient *gradient = GetNativeGradient();
257 SetStatus(DllExports::GdipGetLinePresetBlendCount(gradient, &count));
258 return count;
259 }

◆ GetInterpolationColors()

Status LinearGradientBrush::GetInterpolationColors ( Color presetColors,
REAL blendPositions,
INT  count 
) const
inline

Definition at line 262 of file gdiplusbrush.h.

263 {
265 }
@ NotImplemented
Definition: gdiplustypes.h:32

◆ GetLinearColors()

Status LinearGradientBrush::GetLinearColors ( Color colors) const
inline

Definition at line 268 of file gdiplusbrush.h.

269 {
270 if (!colors)
272
273 GpLineGradient *gradient = GetNativeGradient();
274
275 ARGB argb[2];
276 SetStatus(DllExports::GdipGetLineColors(gradient, argb));
277 if (lastStatus == Ok)
278 {
279 colors[0] = Color(argb[0]);
280 colors[1] = Color(argb[1]);
281 }
282 return lastStatus;
283 }
DWORD ARGB
@ Ok
Definition: gdiplustypes.h:26
@ InvalidParameter
Definition: gdiplustypes.h:28

◆ GetLinearPoints() [1/2]

Status LinearGradientBrush::GetLinearPoints ( Point points) const
inline

Definition at line 440 of file gdiplusbrush.h.

441 {
442#if 1
444#else
445 GpLineGradient *gradient = GetNativeGradient();
446 return SetStatus(DllExports::GdipGetLinePointsI(gradient, points));
447#endif
448 }
GLsizei const GLfloat * points
Definition: glext.h:8112

◆ GetLinearPoints() [2/2]

Status LinearGradientBrush::GetLinearPoints ( PointF points) const
inline

Definition at line 418 of file gdiplusbrush.h.

419 {
420#if 1
422#else
423 GpLineGradient *gradient = GetNativeGradient();
424 return SetStatus(DllExports::GdipGetLinePoints(gradient, points));
425#endif
426 }

◆ GetNativeGradient()

◆ GetRectangle() [1/2]

Status LinearGradientBrush::GetRectangle ( Rect rect) const
inline

Definition at line 286 of file gdiplusbrush.h.

287 {
288 GpLineGradient *gradient = GetNativeGradient();
289 return SetStatus(DllExports::GdipGetLineRectI(gradient, rect));
290 }

◆ GetRectangle() [2/2]

Status LinearGradientBrush::GetRectangle ( RectF rect) const
inline

Definition at line 293 of file gdiplusbrush.h.

294 {
295 GpLineGradient *gradient = GetNativeGradient();
296 return SetStatus(DllExports::GdipGetLineRect(gradient, rect));
297 }

◆ GetTransform()

Status LinearGradientBrush::GetTransform ( Matrix matrix) const
inline

Definition at line 300 of file gdiplusbrush.h.

301 {
302 GpLineGradient *gradient = GetNativeGradient();
303 return SetStatus(DllExports::GdipGetLineTransform(gradient, getNat(matrix)));
304 }
friend GpBrush *& getNat(const Brush *brush)
Definition: gdiplusbrush.h:97
GLuint GLenum matrix
Definition: glext.h:9407

◆ GetWrapMode()

WrapMode LinearGradientBrush::GetWrapMode ( ) const
inline

Definition at line 307 of file gdiplusbrush.h.

308 {
309
310 WrapMode wrapMode;
311 GpLineGradient *gradient = GetNativeGradient();
312 SetStatus(DllExports::GdipGetLineWrapMode(gradient, &wrapMode));
313 return wrapMode;
314 }
WrapMode
Definition: gdiplusenums.h:206

◆ MultiplyTransform()

Status LinearGradientBrush::MultiplyTransform ( const Matrix matrix,
MatrixOrder  order 
)
inline

Definition at line 317 of file gdiplusbrush.h.

318 {
319 GpLineGradient *gradient = GetNativeGradient();
320 return SetStatus(DllExports::GdipMultiplyLineTransform(gradient, getNat(matrix), order));
321 }
GLuint GLdouble GLdouble GLint GLint order
Definition: glext.h:11194

◆ ResetTransform()

Status LinearGradientBrush::ResetTransform ( )
inline

Definition at line 324 of file gdiplusbrush.h.

325 {
326 GpLineGradient *gradient = GetNativeGradient();
327 return SetStatus(DllExports::GdipResetLineTransform(gradient));
328 }

◆ RotateTransform()

Status LinearGradientBrush::RotateTransform ( REAL  angle,
MatrixOrder  order 
)
inline

Definition at line 331 of file gdiplusbrush.h.

332 {
333 GpLineGradient *gradient = GetNativeGradient();
334 return SetStatus(DllExports::GdipRotateLineTransform(gradient, angle, order));
335 }

◆ ScaleTransform()

Status LinearGradientBrush::ScaleTransform ( REAL  sx,
REAL  sy,
MatrixOrder  order = MatrixOrderPrepend 
)
inline

Definition at line 338 of file gdiplusbrush.h.

339 {
340 GpLineGradient *gradient = GetNativeGradient();
341 return SetStatus(DllExports::GdipScaleLineTransform(gradient, sx, sy, order));
342 }

◆ SetBlend()

Status LinearGradientBrush::SetBlend ( const REAL blendFactors,
const REAL blendPositions,
INT  count 
)
inline

Definition at line 345 of file gdiplusbrush.h.

346 {
347 GpLineGradient *gradient = GetNativeGradient();
348 return SetStatus(DllExports::GdipSetLineBlend(gradient, blendFactors, blendPositions, count));
349 }

◆ SetBlendBellShape()

Status LinearGradientBrush::SetBlendBellShape ( REAL  focus,
REAL  scale 
)
inline

Definition at line 352 of file gdiplusbrush.h.

353 {
354 GpLineGradient *gradient = GetNativeGradient();
355 return SetStatus(DllExports::GdipSetLineSigmaBlend(gradient, focus, scale));
356 }
GLenum GLenum GLenum GLenum GLenum scale
Definition: glext.h:9032

◆ SetBlendTriangularShape()

Status LinearGradientBrush::SetBlendTriangularShape ( REAL  focus,
REAL  scale = 1.0f 
)
inline

Definition at line 359 of file gdiplusbrush.h.

360 {
361 GpLineGradient *gradient = GetNativeGradient();
362 return SetStatus(DllExports::GdipSetLineLinearBlend(gradient, focus, scale));
363 }

◆ SetGammaCorrection()

Status LinearGradientBrush::SetGammaCorrection ( BOOL  useGammaCorrection)
inline

Definition at line 366 of file gdiplusbrush.h.

367 {
368 GpLineGradient *gradient = GetNativeGradient();
369 return SetStatus(DllExports::GdipSetLineGammaCorrection(gradient, useGammaCorrection));
370 }

◆ SetInterpolationColors()

Status LinearGradientBrush::SetInterpolationColors ( const Color presetColors,
const REAL blendPositions,
INT  count 
)
inline

Definition at line 373 of file gdiplusbrush.h.

374 {
376 }

◆ SetLinearColors()

Status LinearGradientBrush::SetLinearColors ( const Color color1,
const Color color2 
)
inline

Definition at line 379 of file gdiplusbrush.h.

380 {
381 GpLineGradient *gradient = GetNativeGradient();
382 return SetStatus(DllExports::GdipSetLineColors(gradient, color1.GetValue(), color2.GetValue()));
383 }

◆ SetLinearPoints() [1/2]

Status LinearGradientBrush::SetLinearPoints ( const Point point1,
const Point point2 
)
inline

Definition at line 429 of file gdiplusbrush.h.

430 {
431#if 1
433#else
434 GpLineGradient *gradient = GetNativeGradient();
435 return SetStatus(DllExports::GdipSetLinePointsI(gradient, &point1, &point2));
436#endif
437 }

◆ SetLinearPoints() [2/2]

Status LinearGradientBrush::SetLinearPoints ( const PointF point1,
const PointF point2 
)
inline

Definition at line 407 of file gdiplusbrush.h.

408 {
409#if 1
411#else
412 GpLineGradient *gradient = GetNativeGradient();
413 return SetStatus(DllExports::GdipSetLinePoints(gradient, &point1, &point2));
414#endif
415 }

◆ SetTransform()

Status LinearGradientBrush::SetTransform ( const Matrix matrix)
inline

Definition at line 386 of file gdiplusbrush.h.

387 {
388 GpLineGradient *gradient = GetNativeGradient();
389 return SetStatus(DllExports::GdipSetLineTransform(gradient, getNat(matrix)));
390 }

◆ SetWrapMode()

Status LinearGradientBrush::SetWrapMode ( WrapMode  wrapMode)
inline

Definition at line 393 of file gdiplusbrush.h.

394 {
395 GpLineGradient *gradient = GetNativeGradient();
396 return SetStatus(DllExports::GdipSetLineWrapMode(gradient, wrapMode));
397 }

◆ TranslateTransform()

Status LinearGradientBrush::TranslateTransform ( REAL  dx,
REAL  dy,
MatrixOrder  order = MatrixOrderPrepend 
)
inline

Definition at line 400 of file gdiplusbrush.h.

401 {
402 GpLineGradient *gradient = GetNativeGradient();
403 return SetStatus(DllExports::GdipTranslateLineTransform(gradient, dx, dy, order));
404 }
GLint dy
Definition: linetemp.h:97
GLint dx
Definition: linetemp.h:97

Friends And Related Function Documentation

◆ Pen

friend class Pen
friend

Definition at line 167 of file gdiplusbrush.h.


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