[SDK][INCLUDE] Rename Gdiplus::Brush::brush as nativeBrush (#2204)

Make it w32api-compatible. CORE-16585
This commit is contained in:
Katayama Hirofumi MZ 2019-12-31 12:36:08 +09:00 committed by GitHub
parent 39eceedd89
commit dcc512a245
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 34 additions and 27 deletions

View file

@ -40,13 +40,13 @@ class Brush : public GdiplusBase
BrushType GetType(VOID) BrushType GetType(VOID)
{ {
BrushType type; BrushType type;
SetStatus(DllExports::GdipGetBrushType(brush, &type)); SetStatus(DllExports::GdipGetBrushType(nativeBrush, &type));
return type; return type;
} }
private: private:
mutable Status status; mutable Status status;
GpBrush *brush; GpBrush *nativeBrush;
Status Status
SetStatus(Status status) const SetStatus(Status status) const

View file

@ -719,53 +719,54 @@ class Graphics : public GdiplusBase
Status Status
FillClosedCurve(const Brush *brush, const Point *points, INT count) FillClosedCurve(const Brush *brush, const Point *points, INT count)
{ {
return SetStatus(DllExports::GdipFillClosedCurveI(graphics, brush ? brush->brush : NULL, points, count)); return SetStatus(DllExports::GdipFillClosedCurveI(graphics, brush ? brush->nativeBrush : NULL, points, count));
} }
Status Status
FillClosedCurve(const Brush *brush, const Point *points, INT count, FillMode fillMode, REAL tension) FillClosedCurve(const Brush *brush, const Point *points, INT count, FillMode fillMode, REAL tension)
{ {
return SetStatus( return SetStatus(DllExports::GdipFillClosedCurve2I(
DllExports::GdipFillClosedCurve2I(graphics, brush ? brush->brush : NULL, points, count, tension, fillMode)); graphics, brush ? brush->nativeBrush : NULL, points, count, tension, fillMode));
} }
Status Status
FillClosedCurve(const Brush *brush, const PointF *points, INT count) FillClosedCurve(const Brush *brush, const PointF *points, INT count)
{ {
return SetStatus(DllExports::GdipFillClosedCurve(graphics, brush ? brush->brush : NULL, points, count)); return SetStatus(DllExports::GdipFillClosedCurve(graphics, brush ? brush->nativeBrush : NULL, points, count));
} }
Status Status
FillClosedCurve(const Brush *brush, const PointF *points, INT count, FillMode fillMode, REAL tension) FillClosedCurve(const Brush *brush, const PointF *points, INT count, FillMode fillMode, REAL tension)
{ {
return SetStatus( return SetStatus(DllExports::GdipFillClosedCurve2(
DllExports::GdipFillClosedCurve2(graphics, brush ? brush->brush : NULL, points, count, tension, fillMode)); graphics, brush ? brush->nativeBrush : NULL, points, count, tension, fillMode));
} }
Status Status
FillEllipse(const Brush *brush, const Rect &rect) FillEllipse(const Brush *brush, const Rect &rect)
{ {
return SetStatus(DllExports::GdipFillEllipseI( return SetStatus(DllExports::GdipFillEllipseI(
graphics, brush ? brush->brush : NULL, rect.X, rect.Y, rect.Width, rect.Height)); graphics, brush ? brush->nativeBrush : NULL, rect.X, rect.Y, rect.Width, rect.Height));
} }
Status Status
FillEllipse(const Brush *brush, REAL x, REAL y, REAL width, REAL height) FillEllipse(const Brush *brush, REAL x, REAL y, REAL width, REAL height)
{ {
return SetStatus(DllExports::GdipFillEllipse(graphics, brush ? brush->brush : NULL, x, y, width, height)); return SetStatus(DllExports::GdipFillEllipse(graphics, brush ? brush->nativeBrush : NULL, x, y, width, height));
} }
Status Status
FillEllipse(const Brush *brush, const RectF &rect) FillEllipse(const Brush *brush, const RectF &rect)
{ {
return SetStatus(DllExports::GdipFillEllipse( return SetStatus(DllExports::GdipFillEllipse(
graphics, brush ? brush->brush : NULL, rect.X, rect.Y, rect.Width, rect.Height)); graphics, brush ? brush->nativeBrush : NULL, rect.X, rect.Y, rect.Width, rect.Height));
} }
Status Status
FillEllipse(const Brush *brush, INT x, INT y, INT width, INT height) FillEllipse(const Brush *brush, INT x, INT y, INT width, INT height)
{ {
return SetStatus(DllExports::GdipFillEllipseI(graphics, brush ? brush->brush : NULL, x, y, width, height)); return SetStatus(
DllExports::GdipFillEllipseI(graphics, brush ? brush->nativeBrush : NULL, x, y, width, height));
} }
Status Status
@ -778,90 +779,96 @@ class Graphics : public GdiplusBase
FillPie(const Brush *brush, const Rect &rect, REAL startAngle, REAL sweepAngle) FillPie(const Brush *brush, const Rect &rect, REAL startAngle, REAL sweepAngle)
{ {
return SetStatus(DllExports::GdipFillPieI( return SetStatus(DllExports::GdipFillPieI(
graphics, brush ? brush->brush : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)); graphics, brush ? brush->nativeBrush : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle,
sweepAngle));
} }
Status Status
FillPie(const Brush *brush, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle) FillPie(const Brush *brush, INT x, INT y, INT width, INT height, REAL startAngle, REAL sweepAngle)
{ {
return SetStatus(DllExports::GdipFillPieI( return SetStatus(DllExports::GdipFillPieI(
graphics, brush ? brush->brush : NULL, x, y, width, height, startAngle, sweepAngle)); graphics, brush ? brush->nativeBrush : NULL, x, y, width, height, startAngle, sweepAngle));
} }
Status Status
FillPie(const Brush *brush, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle) FillPie(const Brush *brush, REAL x, REAL y, REAL width, REAL height, REAL startAngle, REAL sweepAngle)
{ {
return SetStatus(DllExports::GdipFillPie( return SetStatus(DllExports::GdipFillPie(
graphics, brush ? brush->brush : NULL, x, y, width, height, startAngle, sweepAngle)); graphics, brush ? brush->nativeBrush : NULL, x, y, width, height, startAngle, sweepAngle));
} }
Status Status
FillPie(const Brush *brush, RectF &rect, REAL startAngle, REAL sweepAngle) FillPie(const Brush *brush, RectF &rect, REAL startAngle, REAL sweepAngle)
{ {
return SetStatus(DllExports::GdipFillPie( return SetStatus(DllExports::GdipFillPie(
graphics, brush ? brush->brush : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle)); graphics, brush ? brush->nativeBrush : NULL, rect.X, rect.Y, rect.Width, rect.Height, startAngle,
sweepAngle));
} }
Status Status
FillPolygon(const Brush *brush, const Point *points, INT count) FillPolygon(const Brush *brush, const Point *points, INT count)
{ {
return SetStatus(DllExports::GdipFillPolygon2I(graphics, brush ? brush->brush : NULL, points, count)); return SetStatus(DllExports::GdipFillPolygon2I(graphics, brush ? brush->nativeBrush : NULL, points, count));
} }
Status Status
FillPolygon(const Brush *brush, const PointF *points, INT count) FillPolygon(const Brush *brush, const PointF *points, INT count)
{ {
return SetStatus(DllExports::GdipFillPolygon2(graphics, brush ? brush->brush : NULL, points, count)); return SetStatus(DllExports::GdipFillPolygon2(graphics, brush ? brush->nativeBrush : NULL, points, count));
} }
Status Status
FillPolygon(const Brush *brush, const Point *points, INT count, FillMode fillMode) FillPolygon(const Brush *brush, const Point *points, INT count, FillMode fillMode)
{ {
return SetStatus(DllExports::GdipFillPolygonI(graphics, brush ? brush->brush : NULL, points, count, fillMode)); return SetStatus(
DllExports::GdipFillPolygonI(graphics, brush ? brush->nativeBrush : NULL, points, count, fillMode));
} }
Status Status
FillPolygon(const Brush *brush, const PointF *points, INT count, FillMode fillMode) FillPolygon(const Brush *brush, const PointF *points, INT count, FillMode fillMode)
{ {
return SetStatus(DllExports::GdipFillPolygon(graphics, brush ? brush->brush : NULL, points, count, fillMode)); return SetStatus(
DllExports::GdipFillPolygon(graphics, brush ? brush->nativeBrush : NULL, points, count, fillMode));
} }
Status Status
FillRectangle(const Brush *brush, const Rect &rect) FillRectangle(const Brush *brush, const Rect &rect)
{ {
return SetStatus(DllExports::GdipFillRectangleI( return SetStatus(DllExports::GdipFillRectangleI(
graphics, brush ? brush->brush : NULL, rect.X, rect.Y, rect.Width, rect.Height)); graphics, brush ? brush->nativeBrush : NULL, rect.X, rect.Y, rect.Width, rect.Height));
} }
Status Status
FillRectangle(const Brush *brush, const RectF &rect) FillRectangle(const Brush *brush, const RectF &rect)
{ {
return SetStatus(DllExports::GdipFillRectangle( return SetStatus(DllExports::GdipFillRectangle(
graphics, brush ? brush->brush : NULL, rect.X, rect.Y, rect.Width, rect.Height)); graphics, brush ? brush->nativeBrush : NULL, rect.X, rect.Y, rect.Width, rect.Height));
} }
Status Status
FillRectangle(const Brush *brush, REAL x, REAL y, REAL width, REAL height) FillRectangle(const Brush *brush, REAL x, REAL y, REAL width, REAL height)
{ {
return SetStatus(DllExports::GdipFillRectangle(graphics, brush ? brush->brush : NULL, x, y, width, height)); return SetStatus(
DllExports::GdipFillRectangle(graphics, brush ? brush->nativeBrush : NULL, x, y, width, height));
} }
Status Status
FillRectangle(const Brush *brush, INT x, INT y, INT width, INT height) FillRectangle(const Brush *brush, INT x, INT y, INT width, INT height)
{ {
return SetStatus(DllExports::GdipFillRectangleI(graphics, brush ? brush->brush : NULL, x, y, width, height)); return SetStatus(
DllExports::GdipFillRectangleI(graphics, brush ? brush->nativeBrush : NULL, x, y, width, height));
} }
Status Status
FillRectangles(const Brush *brush, const Rect *rects, INT count) FillRectangles(const Brush *brush, const Rect *rects, INT count)
{ {
return SetStatus(DllExports::GdipFillRectanglesI(graphics, brush ? brush->brush : NULL, rects, count)); return SetStatus(DllExports::GdipFillRectanglesI(graphics, brush ? brush->nativeBrush : NULL, rects, count));
} }
Status Status
FillRectangles(const Brush *brush, const RectF *rects, INT count) FillRectangles(const Brush *brush, const RectF *rects, INT count)
{ {
return SetStatus(DllExports::GdipFillRectangles(graphics, brush ? brush->brush : NULL, rects, count)); return SetStatus(DllExports::GdipFillRectangles(graphics, brush ? brush->nativeBrush : NULL, rects, count));
} }
Status Status

View file

@ -210,7 +210,7 @@ class Pen : public GdiplusBase
Status Status
SetBrush(const Brush *brush) SetBrush(const Brush *brush)
{ {
return SetStatus(DllExports::GdipSetPenBrushFill(pen, brush ? brush->brush : NULL)); return SetStatus(DllExports::GdipSetPenBrushFill(pen, brush ? brush->nativeBrush : NULL));
} }
Status Status