protected virtual void FillOfficeGlassTopInnerBorder( RectangleF originalRectangle, Color color1, Color color4, int borderThicness, bool fillEllipse) { RectangleF rectangleF = RectangleF.Inflate(originalRectangle, (float)-borderThicness, (float)-borderThicness); if (this.IsInvalidRectangle(rectangleF)) { return; } Color color2 = this.GetColor(this.ReduceAlphaBasedOnOriginal(50, color1)); Color color3 = this.GetColor(this.ReduceAlphaBasedOnOriginal(50, color4)); GradientStop gradientStop1 = new GradientStop(color2, 0.0f); GradientStop gradientStop2 = new GradientStop(color3, 1f); using (RadBrush linearGradientBrush = this.CreateLinearGradientBrush(rectangleF, new GradientStop[2] { gradientStop1, gradientStop2 }, RadLinearGradientMode.Vertical)) { if (fillEllipse) { this.DrawEllipse(rectangleF, linearGradientBrush, (float)borderThicness); } else { this.DrawRectangle(rectangleF, linearGradientBrush, (float)borderThicness); } } }
public override void DrawText( string text, Font font, RadBrush brush, RectangleF rect, TextFormat textFormat) { if (this.textRendererMode == TextRendererMode.GdiPlus) { if (textFormat != null) { this.graphics.DrawString(text, font, (Brush)brush.RawBrush, rect, (StringFormat)textFormat); } else { this.graphics.DrawString(text, font, (Brush)brush.RawBrush, rect); } } else if (textFormat != null) { TextRenderer.DrawText((IDeviceContext)this.graphics, text, font, Point.Round(rect.Location), ((SolidBrush)brush.RawBrush).Color, textFormat.TextFormatFlags); } else { TextRenderer.DrawText((IDeviceContext)this.graphics, text, font, Point.Round(rect.Location), ((SolidBrush)brush.RawBrush).Color); } }
protected void FillRectangle(RectangleF rectangle, RadBrush brush) { using (Path path = this.CreatePath()) { path.AddRectangle(rectangle); this.FillPathCore(path, brush); } }
protected void DrawEllipse(RectangleF rectangle, RadBrush brush, float width) { using (Path path = this.CreatePath()) { path.AddEllipse(rectangle); this.DrawPathCore(path, brush, width); } }
public void DrawText( string text, Font font, RadBrush brush, PointF point, TextFormat textFormat) { this.surface.DrawText(text, font, brush, new RectangleF(point.X, point.Y, 0.0f, 0.0f), textFormat); }
public void DrawText( string text, Font font, RadBrush brush, RectangleF rect, TextFormat format) { this.surface.DrawText(text, font, brush, rect, format); }
public override void FillRectangle( RadBrush brush, float x, float y, float width, float height) { this.graphics.FillRectangle((Brush)brush.RawBrush, x, y, width, height); }
public void DrawText( string text, Font font, RadBrush brush, float x, float y, TextFormat textFormat) { this.surface.DrawText(text, font, brush, new RectangleF(x, y, 0.0f, 0.0f), textFormat); }
public override void DrawText(ITextElement element, RadBrush brush, RectangleF rect) { if (this.textRendererMode == TextRendererMode.GdiPlus) { this.graphics.DrawString(element.Text, element.Font, (Brush)brush.RawBrush, rect, (StringFormat)element.TextFormat); } else { TextRenderer.DrawText((IDeviceContext)this.graphics, element.Text, element.Font, Point.Round(rect.Location), element.ForeColor, element.TextFormat.TextFormatFlags); } }
protected override void FillRoundedRectangleCore( RoundedRectangle roundedRectangle, RadBrush brush) { GraphicsPath roundedRectangle1 = roundedRectangle.RawRoundedRectangle as GraphicsPath; Brush rawBrush = brush.RawBrush as Brush; SmoothingMode smoothingMode = this.graphics.SmoothingMode; this.graphics.SmoothingMode = SmoothingMode.AntiAlias; this.graphics.FillPath(rawBrush, roundedRectangle1); this.graphics.SmoothingMode = smoothingMode; }
protected virtual void FillOfficeGlassMain( Color color3, RectangleF innerRectangle, bool fillEllipse) { using (RadBrush solidBrush = this.CreateSolidBrush(color3)) { if (fillEllipse) { this.FillEllipse(innerRectangle, solidBrush); } else { this.FillRectangle(innerRectangle, solidBrush); } } }
protected virtual void FillOfficeGlassOuterBorder( RectangleF originalRectangle, Color color3, int borderThicness, bool fillEllipse) { GradientStop gradientStop1 = new GradientStop(this.ReduceAlphaBasedOnOriginal(100, color3), 0.0f); GradientStop gradientStop2 = new GradientStop(color3, 1f); using (RadBrush linearGradientBrush = this.CreateLinearGradientBrush(originalRectangle, new GradientStop[2] { gradientStop1, gradientStop2 }, RadLinearGradientMode.Vertical)) { if (fillEllipse) { this.DrawEllipse(originalRectangle, linearGradientBrush, (float)borderThicness); } else { this.DrawRectangle(originalRectangle, linearGradientBrush, (float)borderThicness); } } }
private void FillGel( Path path, GradientStop[] colorStops, float gradientPercentage, float gradientPercentage2) { if (colorStops.Length < 2) { this.FillSolid(path, colorStops[0].Color); } else { this.FillLinear(path, colorStops, 90f); } RectangleF bounds = path.GetBounds(); float num1 = bounds.Height / 2f; float num2 = (float)(int)Math.Round(100.0 * (double)gradientPercentage * 0.2); float num3 = (float)(int)Math.Round((double)num1 * (double)gradientPercentage2 * 0.2); RectangleF rect = new RectangleF(bounds.X + num2, bounds.Y, (float)((double)bounds.Width - (double)num2 * 2.0 - 1.0), num1 - num3 * 2f); if (this.IsInvalidRectangle(rect)) { return; } using (RoundedRectangle roundedRectangle = this.CreateRoundedRectangle(rect, rect.Height / 2f)) { RectangleF rectangle = RectangleF.Inflate(rect, 1f, 1f); Color color = this.GetColor(Color.White); GradientStop gradientStop1 = new GradientStop(this.ReduceAlphaBasedOnOriginal(253, color), 0.0f); GradientStop gradientStop2 = new GradientStop(this.ReduceAlphaBasedOnOriginal(42, color), 1f); using (RadBrush linearGradientBrush = this.CreateLinearGradientBrush(rectangle, new GradientStop[2] { gradientStop1, gradientStop2 }, RadLinearGradientMode.Vertical)) this.FillRoundedRectangleCore(roundedRectangle, linearGradientBrush); } }
protected override void FillPathCore(Path path, RadBrush brush) { GraphicsPath rawPath = path.RawPath as GraphicsPath; this.graphics.FillPath(brush.RawBrush as Brush, rawPath); }
private void FillSolid(Path path, Color color) { using (RadBrush solidBrush = this.CreateSolidBrush(color)) this.FillPathCore(path, solidBrush); }
public abstract void FillRectangle( RadBrush brush, float x, float y, float width, float height);
public void DrawRectangle(RadBrush brush, float x1, float y1, float x2, float y2) { this.surface.DrawRectangle(brush, x1, y1, x2, y2); }
public void DrawRectangle(RadBrush brush, RectangleF rect) { this.surface.DrawRectangle(brush, rect.Left, rect.Top, rect.Right, rect.Bottom); }
public abstract void FillPolygon(RadBrush brush, PointF[] points);
public abstract void DrawRectangle(RadBrush brush, float x1, float y1, float x2, float y2);
public abstract void DrawText(ITextElement element, RadBrush brush, RectangleF rect);
protected abstract void DrawPathCore(Path path, RadBrush brush, float width);
protected override void DrawPathCore(Path path, RadBrush brush, float width) { using (Pen pen = new Pen(brush.RawBrush as Brush, width)) this.graphics.DrawPath(pen, path.RawPath as GraphicsPath); }
protected abstract void FillPathCore(Path path, RadBrush brush);
public abstract void DrawText( string text, Font font, RadBrush brush, RectangleF rect, TextFormat textFormat);
protected abstract void FillRoundedRectangleCore( RoundedRectangle roundedRectangle, RadBrush brush);
public override void FillPolygon(RadBrush brush, PointF[] points) { this.graphics.FillPolygon((Brush)brush.RawBrush, points); }
private void FillLinear(Path path, GradientStop[] colorStops, float gradientAngle) { using (RadBrush linearGradientBrush = this.CreateLinearGradientBrush(path.GetBounds(), colorStops, gradientAngle)) this.FillPathCore(path, linearGradientBrush); }
public override void DrawRectangle(RadBrush brush, float x1, float y1, float x2, float y2) { using (Pen pen = new Pen((Brush)brush.RawBrush)) this.graphics.DrawRectangle(pen, x1, y1, x2, y2); }
public abstract void DrawLine(RadBrush brush, float x1, float y1, float x2, float y2);