Example #1
0
        public void Render(IPreview frameEditor, Rect rect)
        {
            if (_line == null)
            {
                _line = new Rectangle();
                frameEditor.Canva.Children.Add(_line);
                _line.StrokeThickness     = 1;
                _line.SnapsToDevicePixels = true;
                _line.SetValue(RenderOptions.EdgeModeProperty, EdgeMode.Aliased);
            }

            _line.Fill   = BufferedBrushes.GetBrush(SelectionOverlay);
            _line.Height = (int)rect.Height;
            _line.Width  = (int)rect.Width;

            _line.Margin = new Thickness((int)rect.X, (int)rect.Y, 0, 0);
            _line.Stroke = BufferedBrushes.GetBrush(SelectionBorder);
        }
Example #2
0
 static LayerDraw()
 {
     BufferedBrushes.Register(SelectionBorderBrush, () => SdeAppConfiguration.ActEditorSpriteSelectionBorder);
     BufferedBrushes.Register(SelectionOverlayBrush, () => SdeAppConfiguration.ActEditorSpriteSelectionBorderOverlay);
 }
Example #3
0
 private Brush _getBorderBackgroundBrush()
 {
     return(BufferedBrushes.GetBrush(SelectionOverlayBrush));
 }
Example #4
0
 private Brush _getBorderBrush()
 {
     return(BufferedBrushes.GetBrush(SelectionBorderBrush));
 }
Example #5
0
 static SelectionDraw()
 {
     BufferedBrushes.Register(SelectionBorder, () => SdeAppConfiguration.ActEditorSelectionBorder);
     BufferedBrushes.Register(SelectionOverlay, () => SdeAppConfiguration.ActEditorSelectionBorderOverlay);
 }
Example #6
0
 static GridLine()
 {
     BufferedBrushes.Register(GridLineHorizontalBrush, () => SdeAppConfiguration.ActEditorGridLineHorizontal);
     BufferedBrushes.Register(GridLineVerticalBrush, () => SdeAppConfiguration.ActEditorGridLineVertical);
 }
Example #7
0
 private Brush _getColor()
 {
     return(BufferedBrushes.GetBrush(_orientation == Orientation.Horizontal ? GridLineHorizontalBrush : GridLineVerticalBrush));
 }