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); }
static LayerDraw() { BufferedBrushes.Register(SelectionBorderBrush, () => SdeAppConfiguration.ActEditorSpriteSelectionBorder); BufferedBrushes.Register(SelectionOverlayBrush, () => SdeAppConfiguration.ActEditorSpriteSelectionBorderOverlay); }
private Brush _getBorderBackgroundBrush() { return(BufferedBrushes.GetBrush(SelectionOverlayBrush)); }
private Brush _getBorderBrush() { return(BufferedBrushes.GetBrush(SelectionBorderBrush)); }
static SelectionDraw() { BufferedBrushes.Register(SelectionBorder, () => SdeAppConfiguration.ActEditorSelectionBorder); BufferedBrushes.Register(SelectionOverlay, () => SdeAppConfiguration.ActEditorSelectionBorderOverlay); }
static GridLine() { BufferedBrushes.Register(GridLineHorizontalBrush, () => SdeAppConfiguration.ActEditorGridLineHorizontal); BufferedBrushes.Register(GridLineVerticalBrush, () => SdeAppConfiguration.ActEditorGridLineVertical); }
private Brush _getColor() { return(BufferedBrushes.GetBrush(_orientation == Orientation.Horizontal ? GridLineHorizontalBrush : GridLineVerticalBrush)); }