private void CreateObjects() { brSolid = new SolidBrushPlus(Color.CornflowerBlue); penSolid = new PenPlus(Color.Red, 10); penSolid.SetEndCap(LineCap.LineCapRound); penSolid.SetStartCap(LineCap.LineCapArrowAnchor); brHatch = new HatchBrush(HatchStyle.HatchStyle25Percent, Color.Black, Color.White); penHatch = new PenPlus(brHatch, 10); penSolidTrans = new PenPlus(Color.FromArgb(-0x5f7f7f7f), 10); penSolidCustomCap = new PenPlus(Color.Black, 20); GraphicsPath path = new GraphicsPath(FillMode.FillModeAlternate); path.AddEllipse(-0.5f, -1.5f, 1, 3); CustomLineCap cap = new CustomLineCap(null, path, LineCap.LineCapFlat, 0); penSolidCustomCap.SetCustomEndCap(cap); penDash = new PenPlus(Color.Black, 5); penDash.SetDashStyle(DashStyle.DashStyleDot); brGrad = new LinearGradientBrush( new GpPointF(0, 0), new GpPointF(100, 100), Color.Black, Color.White); penGradient = new PenPlus(brGrad, 30); }
public GpStatus SetCustomEndCap(CustomLineCap customCap) { GpCustomLineCap nativeCap = new GpCustomLineCap(); if (customCap != null) { nativeCap = customCap.nativeCap; } return(SetStatus(NativeMethods.GdipSetPenCustomEndCap(nativePen, nativeCap))); }
public GpStatus GetCustomEndCap(out CustomLineCap customCap) { customCap = new CustomLineCap(); return(SetStatus(NativeMethods.GdipGetPenCustomEndCap(nativePen, out customCap.nativeCap))); }
public GpStatus GetCustomEndCap(out CustomLineCap customCap) { customCap = new CustomLineCap(); return SetStatus(NativeMethods.GdipGetPenCustomEndCap(nativePen, out customCap.nativeCap)); }
public GpStatus SetCustomStartCap(CustomLineCap customCap) { GpCustomLineCap nativeCap = new GpCustomLineCap(); if (customCap != null) nativeCap = customCap.nativeCap; return SetStatus(NativeMethods.GdipSetPenCustomStartCap(nativePen, nativeCap)); }