public Text(System.Drawing.Font font, string content) { this._trimming = TextTrimming.WordEllipsis; this._text = content; this._font = font; this._foreColor = Colors.Black; }
public TextRun(string text, System.Drawing.Font font, GHIElectronics.TinyCLR.UI.Media.Color foreColor) { if ((text == null) || (text.Length == 0)) { throw new ArgumentNullException("Text must be non-null and non-empty"); } this.Text = text; this.Font = font ?? throw new ArgumentNullException("font must be non-null"); this.ForeColor = foreColor; }
public Icon(Bitmap icon, string text) : base() { if (icon != null) { this.bitmapImage = BitmapImage.FromGraphics(Graphics.FromImage(icon)); } this.IconText = text; this.Font = Resources.GetFont(Resources.FontResources.droid_reg09); TextColor = Colors.White; }
public Icon(Bitmap icon, string text) : base() { if (icon != null) { var gfx = Graphics.FromImage(icon); gfx.MakeTransparent(System.Drawing.Color.FromArgb(0x00FF00F2)); // MakeTransparent is only available from TinyCLR OS rc2 this.bitmapImage = BitmapImage.FromGraphics(gfx); } this.IconText = text; this.Font = Resources.GetFont(Resources.FontResources.droid_reg09); TextColor = Colors.White; }
public void SetPixel(int x, int y, GHIElectronics.TinyCLR.UI.Media.Color color) { this.g.surface.SetPixel(x, y, color.ToNativeColor()); }
public int Add(string text, Font font, GHIElectronics.TinyCLR.UI.Media.Color foreColor) { return(this.Add(new TextRun(text, font, foreColor))); }
internal bool DrawTextInRect(ref string text, ref int xRelStart, ref int yRelStart, int v1, int v2, int width, int height, uint flags, GHIElectronics.TinyCLR.UI.Media.Color color, Font font) { return(this.g.surface.DrawTextInRect(ref text, ref xRelStart, ref yRelStart, v1, v2, width, height, flags, color.ToNativeColor(), font)); }
public void DrawText(string text, Font font, GHIElectronics.TinyCLR.UI.Media.Color color, int v1, int v2) { this.g.surface.DrawText(text, font, color.ToNativeColor(), v1, v2); }
public void DrawRectangle(GHIElectronics.TinyCLR.UI.Media.Color outlineColor, ushort outlineThickness, int x, int y, int width, int height, int v1, int v2, GHIElectronics.TinyCLR.UI.Media.Color color1, int v3, int v4, GHIElectronics.TinyCLR.UI.Media.Color color2, int v5, int v6, ushort opacity) { this.g.surface.DrawRectangle(outlineColor.ToNativeColor(), outlineThickness, x, y, width, height, v1, v2, color1.ToNativeColor(), v3, v4, color2.ToNativeColor(), v5, v6, opacity); }
public void DrawLine(GHIElectronics.TinyCLR.UI.Media.Color color, int v, int ix1, int y1, int ix2, int y2) { this.g.surface.DrawLine(color.ToNativeColor(), v, ix1, y1, ix2, y2); }
public void DrawEllipse(GHIElectronics.TinyCLR.UI.Media.Color color1, ushort thickness, int v1, int v2, int xRadius, int yRadius, GHIElectronics.TinyCLR.UI.Media.Color color2, int v3, int v4, GHIElectronics.TinyCLR.UI.Media.Color color3, int v5, int v6, ushort v7) { this.g.surface.DrawEllipse(color1.ToNativeColor(), thickness, v1, v2, xRadius, yRadius, color2.ToNativeColor(), v3, v4, color3.ToNativeColor(), v5, v6, v7); }