public void Init()
 {
     MainGraphics !.OriginalSize = new SKSize(55, 72); //change to what the original size is.
     _darkSlateBluePaint         = MiscHelpers.GetSolidPaint(SKColors.DarkSlateBlue);
     _whitePaint  = MiscHelpers.GetSolidPaint(SKColors.White);
     _blackBorder = MiscHelpers.GetStrokePaint(SKColors.Black, 2);
 }
Esempio n. 2
0
        public void DrawBorders(SKCanvas dc, SKRect rect_Card)
        {
            SKPaint thisPaint = MiscHelpers.GetStrokePaint(SKColors.Black, 3); //i think 3 is enough.

            MainGraphics !.DrawDefaultRectangles(dc, rect_Card, thisPaint);
            DrawHighLights(dc, rect_Card);
        }
 public void Init()
 {
     _dDrewPaint    = MainGraphics !.GetStandardDrewPaint();
     _selectPaint   = BaseDeckGraphicsCP.GetStandardSelectPaint();
     _separatePaint = MiscHelpers.GetStrokePaint(SKColors.Black, 4); // try 4 well see how it goes.
     _dicePaint     = MiscHelpers.GetStrokePaint(SKColors.Black, 1);
 }
        public void DrawImage(SKCanvas ThisCanvas, float Width, float Height) // i think this is it.
        {
            var ThisRect = SKRect.Create(0, 0, Width, Height);

            ThisCanvas.Clear();
            ThisCanvas.DrawBitmap(_img_LilyPad, ThisRect, _bitPaint);
            if (HasFrog == true)
            {
                ThisCanvas.DrawBitmap(_img_Frog, ThisRect, _bitPaint);
            }
            SKPaint?ThisPaint = null;

            if (IsSelected == true)
            {
                ThisPaint = MiscHelpers.GetStrokePaint(SKColors.Red, Width / 30);
            }
            else if (IsTarget == true)
            {
                ThisPaint = MiscHelpers.GetStrokePaint(SKColors.Lime, Width / 10);
                float[] Ins;
                Ins    = new float[2];
                Ins[0] = Width / 20;
                Ins[1] = Width / 20;
                ThisPaint.PathEffect = SKPathEffect.CreateDash(Ins, 1); // not sure
            }
            if (IsSelected == true || IsTarget == true)
            {
                ThisCanvas.DrawRoundRect(ThisRect, Width / 10, Width / 10, ThisPaint);
            }
        }
Esempio n. 5
0
        private void DrawFourRectangles(SKCanvas canvas, SKRect rect_Card)
        {
            int widths;
            int heights;

            widths  = (int)rect_Card.Width / 2;
            heights = (int)rect_Card.Height / 2;
            SKRect newRect;

            newRect = SKRect.Create(rect_Card.Left, rect_Card.Top, widths, heights);
            canvas.DrawRoundRect(newRect, 0, 0, _redBrush);
            newRect = SKRect.Create(rect_Card.Left + widths, rect_Card.Top, widths, heights);
            canvas.DrawRoundRect(newRect, 0, 0, _yellowBrush);
            newRect = SKRect.Create(rect_Card.Left + widths, rect_Card.Top + heights, widths, heights);
            canvas.DrawRoundRect(newRect, 0, 0, _blueBrush);
            newRect = SKRect.Create(rect_Card.Left, rect_Card.Top + heights, widths, heights);
            canvas.DrawRoundRect(newRect, 0, 0, _greenBrush);
            if ((CardType == EnumTypeList.Color) | (CardType == EnumTypeList.Draw4))
            {
                var newLeft = rect_Card.Left + (widths / 2);
                var newTop  = rect_Card.Top + (heights / 2);
                newRect = SKRect.Create(newLeft, newTop, widths, heights);
                var firstPaint = MiscHelpers.GetSolidPaint(MainGraphics !.BackgroundColor.ToSKColor());
                canvas.DrawRect(newRect, firstPaint);
                var SecondPaint = MiscHelpers.GetStrokePaint(SKColors.Black, 2); // try 2
                canvas.DrawRect(newRect, SecondPaint);
            }
        }
 public CirclePieceCP()
 {
     NeedsHighlighting = false;
     _borderPaint      = MiscHelpers.GetStrokePaint(SKColors.Black, 3); // i think 3 is fine.
     _thickBorder      = MiscHelpers.GetStrokePaint(SKColors.Black, 5);
     _whitePaint       = MiscHelpers.GetSolidPaint(SKColors.White);
 }
Esempio n. 7
0
        public void DrawDice(SKCanvas dc)
        {
            if (NeedsToClear == true)
            {
                dc.Clear();
            }
            if (Value == 0)
            {
                return;  //because the dice value is 0.
            }
            SKRect rect_Card;

            rect_Card = SKRect.Create(Location.X, Location.Y, ActualWidthHeight, ActualWidthHeight); //i think
            dc.DrawRoundRect(rect_Card, RoundedRadius, RoundedRadius, _fillPaint);
            if (IsSelected == true || Hold == true)
            {
                dc.DrawRoundRect(rect_Card, RoundedRadius, RoundedRadius, _selectPaint);
            }
            if (_borderPaint == null)
            {
                _borderPaint = MiscHelpers.GetStrokePaint(SKColors.Black, NormalBorderWidth);
            }
            dc.DrawRoundRect(rect_Card, RoundedRadius, RoundedRadius, _borderPaint);
            FinishDrawing(dc, rect_Card);
        }
 public WeaponCP()
 {
     _thisA          = Assembly.GetAssembly(GetType());
     _borderPaint    = MiscHelpers.GetStrokePaint(SKColors.Black, 1);
     _mainHatchPaint = GetPaint("blackaqualightupwards.png");
     _cardHatchPaint = GetPaint("blacksilverlightupwards.png");
 }
Esempio n. 9
0
 public TicTacToeGraphicsCP(TicTacToeMainGameClass mainGame)
 {
     _spaceList  = mainGame.SaveRoot !.GameBoard;
     _blackPen   = MiscHelpers.GetStrokePaint(SKColors.Black, 2);
     _whitePaint = MiscHelpers.GetSolidPaint(SKColors.White);
     _winPen     = MiscHelpers.GetStrokePaint(SKColors.Red, 8);
     _bluePen    = MiscHelpers.GetStrokePaint(SKColors.Blue, 2);
 }
Esempio n. 10
0
        protected override void SetUpPaints()
        {
            _bitPaint = MiscHelpers.GetBitmapPaint();
            Assembly thisA = Assembly.GetAssembly(GetType());

            _thisBit        = ImageExtensions.GetSkBitmap(thisA, "SorryGameBoard.png");
            _highlightPaint = MiscHelpers.GetStrokePaint(SKColors.Fuchsia, 3);
        }
 public void Init()
 {
     MainGraphics !.OriginalSize = new SKSize(107, 135); //change to what the original size is.
     _pDrewPaint  = MainGraphics.GetStandardDrewPaint();
     _selectPaint = BaseDeckGraphicsCP.GetStandardSelectPaint();
     _blackBorder = MiscHelpers.GetStrokePaint(SKColors.Black, 1);
     _greenPaint  = MiscHelpers.GetSolidPaint(SKColors.Green);
 }
Esempio n. 12
0
 public void Init()
 {
     MainGraphics !.OriginalSize = new SKSize(230, 130); //change to what the original size is.
     _whitePaint  = MiscHelpers.GetSolidPaint(SKColors.White);
     _yellowPaint = MiscHelpers.GetSolidPaint(SKColors.Yellow);
     _redPaint    = MiscHelpers.GetSolidPaint(SKColors.Red);
     _thickBorder = MiscHelpers.GetStrokePaint(SKColors.Black, 2);
 }
Esempio n. 13
0
 private void CreateBrushes()
 {
     _redSolidBrush     = MiscHelpers.GetSolidPaint(SKColors.Red);
     _redPenBrush       = MiscHelpers.GetStrokePaint(SKColors.Red, 1);
     _slateGrayPenBrush = MiscHelpers.GetStrokePaint(SKColors.SlateGray, 1);
     _blackPenBrush     = MiscHelpers.GetStrokePaint(SKColors.Black, 1);
     _darkGrayPenBrush  = MiscHelpers.GetStrokePaint(SKColors.DarkGray, 1);
 }
Esempio n. 14
0
        private void DrawValue(SKCanvas thisCanvas, SKRect thisRect)
        {
            var fontSize  = thisRect.Height * 1.1f;
            var textPaint = MiscHelpers.GetTextPaint(SKColors.Aqua, fontSize);
            var pen       = MiscHelpers.GetStrokePaint(SKColors.Black, 1);

            thisCanvas.DrawBorderText(Value.ToString(), TextExtensions.EnumLayoutOptions.Center, TextExtensions.EnumLayoutOptions.Center, textPaint, pen, thisRect); // value is already given
        }
Esempio n. 15
0
        private void DrawDistanceCard(SKCanvas canvas, string str_Text, SKRect rect_Card)
        {
            SKPath  gp_Card;
            SKPaint pn_Card;
            SKPaint textBorder;
            SKColor clr_Text   = SKColors.Black;
            SKColor clr_Border = SKColors.Red;
            SKPaint textPaint;

            switch (str_Text)
            {
            case "25":
            {
                clr_Text   = SKColors.Red;
                clr_Border = SKColors.Green;
                break;
            }

            case "50":
            {
                clr_Text   = SKColors.Red;
                clr_Border = SKColors.Blue;
                break;
            }

            case "75":
            {
                clr_Text   = SKColors.Green;
                clr_Border = SKColors.Red;
                break;
            }

            case "100":
            {
                clr_Text   = SKColors.Green;
                clr_Border = SKColors.Blue;
                break;
            }

            case "200":
            {
                clr_Text   = SKColors.Blue;
                clr_Border = SKColors.Green;
                break;
            }
            }
            pn_Card = MiscHelpers.GetStrokePaint(clr_Border, rect_Card.Width / 20);
            gp_Card = new SKPath();
            gp_Card.AddArc(SKRect.Create(System.Convert.ToInt32((rect_Card.Left + (rect_Card.Width / 10))), System.Convert.ToInt32((rect_Card.Top + (rect_Card.Height / 10))), System.Convert.ToInt32(((rect_Card.Width * 4) / 5)), System.Convert.ToInt32(((rect_Card.Height * 3) / 7))), 180, 180);
            gp_Card.AddLine(System.Convert.ToInt32((rect_Card.Left + ((rect_Card.Width * 9) / 10))), System.Convert.ToInt32((rect_Card.Top + ((rect_Card.Height * 9) / 10))), System.Convert.ToInt32((rect_Card.Left + (rect_Card.Width / 10))), System.Convert.ToInt32((rect_Card.Top + ((rect_Card.Height * 9) / 10))));
            gp_Card.Close();
            canvas.DrawPath(gp_Card, pn_Card);
            textPaint              = MiscHelpers.GetTextPaint(clr_Text, rect_Card.Height / 3);
            textBorder             = MiscHelpers.GetStrokePaint(SKColors.Black, 1); // for speed limit, 1 is fine
            textPaint.FakeBoldText = true;
            canvas.DrawBorderText(str_Text, TextExtensions.EnumLayoutOptions.Center, TextExtensions.EnumLayoutOptions.Center, textPaint, textBorder, rect_Card);
        }
Esempio n. 16
0
        public static void DrawFrame(SKCanvas thisCanvas, float width, float height, float strokeWidth) // don't need to create a special control for this (i don't think)
        {
            SKPaint thisPaint;

            thisPaint = MiscHelpers.GetStrokePaint(SKColors.White, strokeWidth);
            var thisRect = SKRect.Create(0, 0, width, height);

            thisCanvas.DrawRect(thisRect, thisPaint);
        } // the purpose of doing it this way is it can work for phone.  because phone does not even have a border control.
Esempio n. 17
0
 public void Init()
 {
     MainGraphics !.OriginalSize = new SKSize(80, 100); //change to what the original size is.
     _pDrewPaint  = MainGraphics.GetStandardDrewPaint();
     _selectPaint = BaseDeckGraphicsCP.GetStandardSelectPaint();
     _blackBorder = MiscHelpers.GetStrokePaint(SKColors.Black, 1);
     _redPaint    = MiscHelpers.GetSolidPaint(SKColors.Red);
     _yellowPaint = MiscHelpers.GetSolidPaint(SKColors.Yellow);
 }
 protected override void SetUpPaints()
 {
     _thisA       = Assembly.GetAssembly(GetType());
     _bitPaint    = MiscHelpers.GetBitmapPaint();
     _thisBit     = ImageExtensions.GetSkBitmap(_thisA, "gameboard.png");
     _blackBorder = MiscHelpers.GetStrokePaint(SKColors.Black, 4);
     _aquaBorder  = MiscHelpers.GetStrokePaint(SKColors.Aqua, 4);
     _limeBorder  = MiscHelpers.GetStrokePaint(SKColors.LimeGreen, 4);
 }
 public void Init()
 {
     if (MainGraphics == null)
     {
         throw new BasicBlankException("You never sent in the main graphics for helpers");
     }
     _thisAssembly = Assembly.GetAssembly(this.GetType());
     _borderPaint  = MiscHelpers.GetStrokePaint(SKColors.Black, 2);
 }
Esempio n. 20
0
 public MiscGraphicsCP()
 {
     MainColor    = cs.Transparent;
     _yellowPaint = MiscHelpers.GetSolidPaint(SKColors.Yellow);
     _borderPaint = MiscHelpers.GetStrokePaint(SKColors.Black, 2);
     _text1Paint  = MiscHelpers.GetStrokePaint(SKColors.Black, 1);
     _whitePaint  = MiscHelpers.GetSolidPaint(SKColors.White);
     _grayPaint   = MiscHelpers.GetSolidPaint(SKColors.Gray);
 }
 public PieceCP()
 {
     OriginalSize      = new SKSize(60, 138); // can be adjusted as needed
     _redPaint         = MiscHelpers.GetSolidPaint(SKColors.Red);
     _yellowPaint      = MiscHelpers.GetSolidPaint(SKColors.Yellow);
     _whitePaint       = MiscHelpers.GetSolidPaint(SKColors.White);
     NeedsHighlighting = true;
     _borderPaint      = MiscHelpers.GetStrokePaint(SKColors.Black, 1);
 }
Esempio n. 22
0
 public void Init()
 {
     MainGraphics !.OriginalSize = new SKSize(107, 135);
     _redFill         = MiscHelpers.GetSolidPaint(SKColors.Red);
     _aquaPen         = MiscHelpers.GetStrokePaint(SKColors.Aqua, 5);
     _maroonFill      = MiscHelpers.GetSolidPaint(SKColors.Maroon);
     _borderTextPaint = MiscHelpers.GetStrokePaint(SKColors.Black, 1);
     _thisAssembly    = Assembly.GetAssembly(this.GetType());
 }
Esempio n. 23
0
        public void DrawBorders(SKCanvas dc, SKRect rect_Card)
        {
            SKPaint thisPaint = MiscHelpers.GetStrokePaint(SKColors.Black, 3); //i think 3 is enough.

            MainGraphics !.DrawDefaultRectangles(dc, rect_Card, thisPaint);
            if (MainGraphics.IsSelected == true)
            {
                MainGraphics.DrawDefaultRectangles(dc, rect_Card, _selectPaint !);
            }
        }
Esempio n. 24
0
        protected override void SetUpPaints()
        {
            Assembly thisA = Assembly.GetAssembly(GetType());

            _fillPaint   = MiscHelpers.GetSolidPaint(SKColors.LightGray);
            _borderPaint = MiscHelpers.GetStrokePaint(SKColors.White, 3);         // try 3
            _publicBit   = ImageExtensions.GetSkBitmap(thisA, "publictrain.png");
            _playerBit   = ImageExtensions.GetSkBitmap(thisA, "playertrain.png"); // for testing, will be this one.
            _bitPaint    = MiscHelpers.GetBitmapPaint();
            _redPaint    = MiscHelpers.GetSolidPaint(SKColors.Red);
        }
Esempio n. 25
0
 protected override void SetUpPaints()
 {
     _brownLine   = MiscHelpers.GetStrokePaint(SKColors.Brown, 2);
     _greenLine   = MiscHelpers.GetStrokePaint(SKColors.Green, 2);
     _redSolid    = MiscHelpers.GetSolidPaint(SKColors.Red);
     _blueSolid   = MiscHelpers.GetSolidPaint(SKColors.Blue);
     _whitePaint  = MiscHelpers.GetSolidPaint(SKColors.White);
     _blackPaint  = MiscHelpers.GetSolidPaint(SKColors.Black);
     _thickSelect = MiscHelpers.GetStrokePaint(SKColors.Black, 4);
     _yellowPaint = MiscHelpers.GetSolidPaint(SKColors.Yellow);
 }
Esempio n. 26
0
 public void Init()
 {
     MainGraphics !.OriginalSize = new SKSize(107, 135); //change to what the original size is.
     _blackBorders   = MiscHelpers.GetStrokePaint(SKColors.Black, 1);
     _blackPaint     = MiscHelpers.GetSolidPaint(SKColors.Black);
     _lightBluePaint = MiscHelpers.GetSolidPaint(SKColors.LightBlue);
     _redPaint       = MiscHelpers.GetSolidPaint(SKColors.Red);
     _thickBorders   = MiscHelpers.GetStrokePaint(SKColors.Black, 2);
     _pDrewPaint     = MainGraphics.GetStandardDrewPaint();
     _selectPaint    = BaseDeckGraphicsCP.GetStandardSelectPaint();
 }
        public void Init()
        {
            MainGraphics !.OriginalSize = new SKSize(60, 40); //change to what the original size is.
            _pDrewPaint  = MainGraphics.GetStandardDrewPaint();
            _selectPaint = BaseDeckGraphicsCP.GetStandardSelectPaint();
            SKColor thisColor  = SKColors.Purple; //we can change as needed.
            SKColor otherColor = new SKColor(thisColor.Red, thisColor.Green, thisColor.Blue, 40);

            _altDrewPaint = MiscHelpers.GetSolidPaint(otherColor);
            _blackPaint   = MiscHelpers.GetSolidPaint(SKColors.Black);
            _blackBorder  = MiscHelpers.GetStrokePaint(SKColors.Black, 2);
        }
        public override void DrawImage(SKCanvas dc)
        {
            var     thisRect = GetRectangle();
            SKPaint thisPaint;

            thisPaint = MiscHelpers.GetSolidPaint(FillColor);
            dc.DrawRect(thisRect, thisPaint);
            thisPaint = MiscHelpers.GetStrokePaint(BorderColor, BorderWidth);
            dc.DrawRect(thisRect, thisPaint);
            thisPaint = MiscHelpers.GetTextPaint(TextColor, FontSize);
            dc.DrawCustomText(Text, TextExtensions.EnumLayoutOptions.Center, TextExtensions.EnumLayoutOptions.Center, thisPaint, thisRect, out _);
        }
Esempio n. 29
0
        private static void CreatePaints()
        {
            if (_penUsed == null)
            {
                _penUsed = MiscHelpers.GetStrokePaint(SKColors.Black, 1);

                _darkOrangePaint = MiscHelpers.GetSolidPaint(SKColors.DarkOrange);
                _bluePaint       = MiscHelpers.GetSolidPaint(SKColors.Blue);
                _firstCube       = MiscHelpers.ColorFromArgb(0, 255, 255, 255);
                _secondCube      = MiscHelpers.ColorFromArgb(100, 255, 255, 255);
                _thirdCube       = MiscHelpers.ColorFromArgb(150, 0, 0, 0);
            }
        }
Esempio n. 30
0
 public void Init()
 {
     MainGraphics !.OriginalSize = new SKSize(55, 72);
     _pDrewPaint  = MainGraphics.GetStandardDrewPaint();
     _selectPaint = BaseDeckGraphicsCP.GetStandardSelectPaint();
     _safefyPaint = MiscHelpers.GetSolidPaint(SKColors.Blue);      // this is blue for safeties
     _basicPen    = MiscHelpers.GetStrokePaint(SKColors.Black, 1); // try this way.
     _whitePaint  = MiscHelpers.GetSolidPaint(SKColors.White);
     _redFill     = MiscHelpers.GetSolidPaint(SKColors.Red);
     _blackPaint  = MiscHelpers.GetSolidPaint(SKColors.Black);
     _grayPaint   = MiscHelpers.GetSolidPaint(SKColors.Gray);
     _greenPaint  = MiscHelpers.GetSolidPaint(SKColors.Green);
 }