Пример #1
0
 public Text(System.Drawing.Font font, string content)
 {
     this._trimming  = TextTrimming.WordEllipsis;
     this._text      = content;
     this._font      = font;
     this._foreColor = Colors.Black;
 }
Пример #2
0
 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;
 }
Пример #3
0
        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;
        }
Пример #4
0
        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;
        }
Пример #5
0
 public void SetPixel(int x, int y, GHIElectronics.TinyCLR.UI.Media.Color color)
 {
     this.g.surface.SetPixel(x, y, color.ToNativeColor());
 }
Пример #6
0
 public int Add(string text, Font font, GHIElectronics.TinyCLR.UI.Media.Color foreColor)
 {
     return(this.Add(new TextRun(text, font, foreColor)));
 }
Пример #7
0
 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));
 }
Пример #8
0
 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);
 }
Пример #9
0
 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);
 }
Пример #10
0
 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);
 }
Пример #11
0
 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);
 }