public PenPlus(BrushPlus brush, float width) { Unit unit = Unit.UnitWorld; nativePen = null; lastResult = NativeMethods.GdipCreatePen2(brush.nativeBrush, width, unit, out nativePen); }
internal virtual BrushPlus Clone() { GpBrush brush = new GpBrush(); SetStatus(NativeMethods.GdipCloneBrush(nativeBrush, out brush)); BrushPlus newBrush = new BrushPlus(brush, lastResult); if (newBrush == null) { NativeMethods.GdipDeleteBrush(brush); } return newBrush; }
internal virtual BrushPlus Clone() { GpBrush brush = new GpBrush(); SetStatus(NativeMethods.GdipCloneBrush(nativeBrush, out brush)); BrushPlus newBrush = new BrushPlus(brush, lastResult); if (newBrush == null) { NativeMethods.GdipDeleteBrush(brush); } return(newBrush); }
public GpStatus FillPie(BrushPlus brush, int x, int y, int width, int height, float startAngle, float sweepAngle) { return SetStatus(NativeMethods.GdipFillPieI(nativeGraphics, brush.nativeBrush, x, y, width, height, startAngle, sweepAngle)); }
public GpStatus FillPie(BrushPlus brush, GpRect rect, float startAngle, float sweepAngle) { return FillPie(brush, rect.X, rect.Y, rect.Width, rect.Height, startAngle, sweepAngle); }
public GpStatus FillPath(BrushPlus brush, GraphicsPath path) { return SetStatus(NativeMethods.GdipFillPath(nativeGraphics, brush.nativeBrush, path.nativePath)); }
public GpStatus FillEllipse(BrushPlus brush, float x, float y, float width, float height) { return SetStatus(NativeMethods.GdipFillEllipse(nativeGraphics, brush.nativeBrush, x, y, width, height)); }
public GpStatus FillRectangles(BrushPlus brush, GpRect[] rects) { return SetStatus(NativeMethods.GdipFillRectanglesI(nativeGraphics, brush.nativeBrush, rects, rects.Length)); }
public GpStatus FillRectangle(BrushPlus brush, GpRect rect) { return FillRectangle(brush, rect.X, rect.Y, rect.Width, rect.Height); }
public GpStatus SetBrush(BrushPlus brush) { return(SetStatus(NativeMethods.GdipSetPenBrushFill(nativePen, brush.nativeBrush))); }
/// <summary> /// Draws the <c>Quadrilateral</c> with <c>Graphics</c> provided. /// </summary> /// <param name="graphics"> /// <c>Graphics</c> used to draw. /// </param> /// <param name="pen"> /// <c>Pen</c> used to draw outline. /// </param> /// <param name="brush"> /// <c>Brush</c> used to fill the inside. /// </param> public void Draw(GraphicsPlus graphics, PenPlus pen, BrushPlus brush) { graphics.FillPath(brush, m_path); graphics.DrawPath(pen, m_path); }
public GpStatus SetBrush(BrushPlus brush) { return SetStatus(NativeMethods.GdipSetPenBrushFill(nativePen, brush.nativeBrush)); }
public GpStatus FillPolygon(BrushPlus brush, GpPoint[] points) { return FillPolygon(brush, points, FillMode.FillModeAlternate); }
public GpStatus FillClosedCurve(BrushPlus brush, GpPoint[] points) { return SetStatus(NativeMethods.GdipFillClosedCurveI(nativeGraphics, brush.nativeBrush, points, points.Length)); }
public GpStatus FillPolygon(BrushPlus brush, GpPoint[] points, FillMode fillMode) { return SetStatus(NativeMethods.GdipFillPolygonI(nativeGraphics, brush.nativeBrush, points, points.Length, fillMode)); }
public GpStatus FillClosedCurve(BrushPlus brush, GpPoint[] points, FillMode fillMode, float tension) { return SetStatus(NativeMethods.GdipFillClosedCurve2I(nativeGraphics, brush.nativeBrush, points, points.Length, tension, fillMode)); }
public GpStatus FillRectangle(BrushPlus brush, int x, int y, int width, int height) { return SetStatus(NativeMethods.GdipFillRectangleI(nativeGraphics, brush.nativeBrush, x, y, width, height)); }
public GpStatus FillEllipse(BrushPlus brush, GpRectF rect) { return FillEllipse(brush, rect.X, rect.Y, rect.Width, rect.Height); }
public GpStatus FillRegion(BrushPlus brush, RegionPlus region) { return SetStatus(NativeMethods.GdipFillRegion(nativeGraphics, brush.nativeBrush, region.nativeRegion)); }
/// <summary> /// Draws the outer periphery of the pie slice. /// </summary> /// <param name="graphics"> /// <c>Graphics</c> object used to draw the surface. /// </param> /// <param name="pen"> /// <c>Pen</c> used to draw outline. /// </param> /// <param name="brush"> /// <c>Brush</c> used to fill the quadrilateral. /// </param> /// <param name="boundingRect"> /// Bounding rectangle that is used to draw the top surface of the /// pie slice. /// </param> /// <param name="startAngle"> /// Start angle (in degrees) of the periphery section. /// </param> /// <param name="endAngle"> /// End angle (in degrees) of the periphery section. /// </param> /// <param name="pointStart"> /// Point representing the start of the periphery. /// </param> /// <param name="pointEnd"> /// Point representing the end of the periphery. /// </param> protected void DrawCylinderSurfaceSection(GraphicsPlus graphics, PenPlus pen, BrushPlus brush, float startAngle, float endAngle, GpPointF pointStart, GpPointF pointEnd) { GraphicsPath path = CreatePathForCylinderSurfaceSection(startAngle, endAngle, pointStart, pointEnd); graphics.FillPath(brush, path); graphics.DrawPath(pen, path); }