Ejemplo n.º 1
0
        public static DesktopBrush Solid(AGS.API.Color color)
        {
            DesktopBrush brush = new DesktopBrush(new SolidBrush(color.Convert()));

            brush.Type  = BrushType.Solid;
            brush.Color = color;
            return(brush);
        }
Ejemplo n.º 2
0
 public void SetPixels(AGS.API.Color color, List <API.Point> points)
 {
     using (FastBitmap bmp = new FastBitmap(_bitmap))
     {
         foreach (var point in points)
         {
             bmp.SetPixel(point.X, point.Y, color.Convert());
         }
     }
 }
Ejemplo n.º 3
0
        public static AndroidBrush Solid(AGS.API.Color color)
        {
            TextPaint paint = CreateTextPaint();

            paint.Color = color.Convert();
            AndroidBrush brush = new AndroidBrush(paint);

            brush.Type  = BrushType.Solid;
            brush.Color = color;
            return(brush);
        }
Ejemplo n.º 4
0
        public IBrush LoadPathsGradientBrush(AGS.API.Color centerColor, AGS.API.PointF centerPoint,
                                             IBlend blend, AGS.API.PointF focusScales, AGS.API.Color[] surroundColors,
                                             IColorBlend interpolationColors, ITransformMatrix transform, AGS.API.WrapMode wrapMode)
        {
            PathGradientBrush g = new PathGradientBrush(new System.Drawing.Point[] { });

            g.Blend               = blend.Convert();
            g.CenterColor         = centerColor.Convert();
            g.CenterPoint         = centerPoint.Convert();
            g.FocusScales         = focusScales.Convert();
            g.SurroundColors      = surroundColors.Convert();
            g.InterpolationColors = interpolationColors.Convert();
            g.Transform           = transform.Convert();
            g.WrapMode            = wrapMode.Convert();
            return(new DesktopBrush(g));
        }
Ejemplo n.º 5
0
 public void SetPixel(AGS.API.Color color, int x, int y)
 {
     _bitmap.SetPixel(x, y, color.Convert());
 }
Ejemplo n.º 6
0
 public IBrush LoadHatchBrush(AGS.API.HatchStyle hatchStyle, AGS.API.Color color, AGS.API.Color backgroundColor)
 {
     return(new DesktopBrush(new HatchBrush(hatchStyle.Convert(), color.Convert(), backgroundColor.Convert())));
 }
Ejemplo n.º 7
0
 public IBrush LoadLinearBrush(AGS.API.Point point1, AGS.API.Point point2, AGS.API.Color color1, AGS.API.Color color2)
 {
     return(new DesktopBrush(new LinearGradientBrush(point1.Convert(), point2.Convert(), color1.Convert(), color2.Convert())));
 }
Ejemplo n.º 8
0
        public IBrush LoadLinearBrush(AGS.API.Point point1, AGS.API.Point point2, AGS.API.Color color1, AGS.API.Color color2)
        {
            var            paint    = AndroidBrush.CreateTextPaint();
            LinearGradient gradient = new LinearGradient(point1.X, point1.Y, point2.X, point2.Y, color1.Convert(), color2.Convert(), Shader.TileMode.Clamp);

            paint.SetShader(gradient);
            return(new AndroidBrush(paint));
        }
Ejemplo n.º 9
0
 public void MakeTransparent(AGS.API.Color color)
 {
     _bitmap.MakeTransparent(color.Convert());
 }