Example #1
0
        public override void Match(PreviewBaseShape matchShape)
        {
            PreviewCane shape = (matchShape as PreviewCane);

            PixelSize           = shape.PixelSize;
            _bottomRightPoint.X = TopLeft.X + (shape.BottomRight.X - shape.TopLeft.X);
            _bottomRightPoint.Y = TopLeft.Y + (shape.BottomRight.Y - shape.TopLeft.Y);
            //_archLeftPoint.X = shape.X;
            _archLeftPoint.Y = _bottomRightPoint.Y - (shape._bottomRightPoint.Y - shape._archLeftPoint.Y);
            Layout();
        }
        private void SetupCane()
        {
            preview.Data = new VixenPreviewData();
            preview.LoadBackground();
            preview.BackgroundAlpha = 0;
            displayItem = new DisplayItem();

            PreviewCane cane = new PreviewCane(new PreviewPoint(10, 10), null, 1);
            cane.StringType = PreviewBaseShape.StringTypes.Pixel;

            cane.LinePixelCount = PixelsPerString() / 2;
            cane.ArchPixelCount = PixelsPerString() / 2;
            cane.PixelSize = Data.PixelSize;
            cane.PixelColor = Color.White;

            cane.ArchLeft = new Point(0, preview.Height / 4);
            cane.TopLeft = new Point(preview.Width / 4, preview.Height / 8);
            cane.BottomRight = new Point((preview.Width / 4) + (preview.Width / 2), (preview.Height / 4) + (preview.Height / 2));

            cane.Layout();
            displayItem.Shape = cane;

            preview.AddDisplayItem(displayItem);
        }