public void SetUITheme(UITheme theme) { m_toolbarRenderer.SetUITheme(theme); var backColor = theme.GetAppDrawingColor(UITheme.AppColor.ToolbarLight); this.BackColor = backColor; MenuBar.BackColor = SystemColors.Menu; ToolBar.BackColor = backColor; FontBar.BackColor = backColor; StatusBar.BackColor = backColor; FormulaBar.BackColor = backColor; // Unfocused colours var color = theme.GetAppDrawingColor(UITheme.AppColor.ToolbarHot); var gridColor = new unvell.ReoGrid.Graphics.SolidColor(color.A, color.R, color.G, color.B); GridControl.ControlStyle.SetColor(ControlAppearanceColors.ColHeadSelectedNotFocusedStart, gridColor); GridControl.ControlStyle.SetColor(ControlAppearanceColors.ColHeadSelectedNotFocusedEnd, gridColor); GridControl.ControlStyle.SetColor(ControlAppearanceColors.ColHeadFullSelectedNotFocusedStart, gridColor); GridControl.ControlStyle.SetColor(ControlAppearanceColors.ColHeadFullSelectedNotFocusedEnd, gridColor); GridControl.ControlStyle.SetColor(ControlAppearanceColors.RowHeadSelectedNotFocused, gridColor); GridControl.ControlStyle.SetColor(ControlAppearanceColors.RowHeadFullSelectedNotFocused, gridColor); // Focused colours color = DrawingColor.AdjustLighting(color, -0.15f, false); gridColor = new unvell.ReoGrid.Graphics.SolidColor(color.A, color.R, color.G, color.B); GridControl.ControlStyle.SetColor(ControlAppearanceColors.ColHeadSelectedStart, gridColor); GridControl.ControlStyle.SetColor(ControlAppearanceColors.ColHeadSelectedEnd, gridColor); GridControl.ControlStyle.SetColor(ControlAppearanceColors.ColHeadFullSelectedStart, gridColor); GridControl.ControlStyle.SetColor(ControlAppearanceColors.ColHeadFullSelectedEnd, gridColor); GridControl.ControlStyle.SetColor(ControlAppearanceColors.RowHeadSelected, gridColor); GridControl.ControlStyle.SetColor(ControlAppearanceColors.RowHeadFullSelected, gridColor); }
public void DrawAndFillRectangle(SolidColor lineColor, IColor fillColor, Rectangle rect, float weight, LineStyles lineStyle) { if (fillColor is SolidColor) { this.FillRectangle(rect, (SolidColor)fillColor); } this.DrawRectangle(rect, lineColor, weight, lineStyle); }
public void DrawRectangle(float x, float y, float width, float height, SolidColor color) { using (var p = new Paint()) { p.Color = color; this.DrawRectangle(p, x, y, width, height); } }
public void DrawAndFillRectangle(SolidColor lineColor, IColor fillColor, Rectangle rect) { if (fillColor is SolidColor) { this.FillRectangle(rect, (SolidColor)fillColor); } this.DrawRectangle(rect, lineColor); }
public void FillRectangleLinear(SolidColor startColor, SolidColor endColor, float angle, Rectangle rect) { using (var p = new Paint()) { p.SetShader(new LinearGradient(rect.Left, rect.Top, rect.Left, rect.Bottom, startColor, endColor, Shader.TileMode.Mirror)); this.canvas.DrawRect((RectF)rect, p); } }
public void DrawRectangle(Rectangle rect, SolidColor color, float width, LineStyles lineStyle) { using (var p = new Paint()) { p.Color = color; p.StrokeWidth = width; this.DrawRectangle(p, rect); } }
public void DrawText(string text, string fontName, float size, SolidColor color, Rectangle rect, ReoGridHorAlign halign, ReoGridVerAlign valign) { using (var p = new Paint()) { using (var font = Typeface.Create(fontName, Android.Graphics.TypefaceStyle.Normal)) { this.DrawText(text, p, font, size, rect, halign, valign); } } }
public void DrawLine(float x1, float y1, float x2, float y2, SolidColor color, float width, LineStyles style) { using (var p = new Paint()) { p.Color = color; p.StrokeWidth = width; switch (style) { case LineStyles.Dot: p.SetPathEffect(new DashPathEffect(new float[] { 1, 1 }, 1)); break; } this.canvas.DrawLine(x1, y1, x2, y2, p); } }
public void DrawEllipse(SolidColor color, float x, float y, float width, float height) { // TODO }
public void DrawEllipse(SolidColor color, Rectangle rectangle) { // TODO }
public void FillRectangle(HatchStyles style, SolidColor hatchColor, SolidColor bgColor, float x, float y, float width, float height) { // TODO }
public void FillRectangle(HatchStyles style, SolidColor hatchColor, SolidColor bgColor, Rectangle rect) { // TODO }
public void DrawLine(float x1, float y1, float x2, float y2, SolidColor color) { this.DrawLine(x1, y1, x2, y2, color, 1, LineStyles.Solid); }
public void DrawLine(Point startPoint, Point endPoint, SolidColor color) { this.DrawLine(startPoint.X, startPoint.Y, endPoint.X, endPoint.Y, color); }
public void DrawText(string text, string fontName, float size, SolidColor color, Rectangle rect) { this.DrawText(text, fontName, size, color, rect, ReoGridHorAlign.General, ReoGridVerAlign.General); }
public void DrawPath(SolidColor color, Path graphicsPath) { // TODO }
public void DrawLines(Point[] points, int start, int length, SolidColor color, float width, LineStyles style) { // TODO }
public void DrawRectangle(Rectangle rect, SolidColor color) { this.DrawRectangle(rect.X, rect.Y, rect.Width, rect.Height, color); }
public void DrawLine(Point startPoint, Point endPoint, SolidColor color, float width, LineStyles style) { this.DrawLine(startPoint.X, startPoint.Y, endPoint.X, endPoint.Y, color, width, style); }