Class ShapeDrawLayerBase
- Namespace
- HeBianGu.Control.LayerBox
- Assembly
- HeBianGu.Control.LayerBox.dll
public abstract class ShapeDrawLayerBase : MouseLayerBase, IMouseLayer, IDrawLayer, ILayer
- Inheritance
-
ShapeDrawLayerBase
- Implements
-
- Derived
-
- Inherited Members
-
- Extension Methods
-
Constructors
ShapeDrawLayerBase()
public ShapeDrawLayerBase()
Fields
LimitProperty
public static readonly DependencyProperty LimitProperty
Field Value
- DependencyProperty
Properties
AddShapeCommand
public DisplayerCommand AddShapeCommand { get; }
Property Value
- DisplayerCommand
CancelCommand
public DisplayerCommand CancelCommand { get; }
Property Value
- DisplayerCommand
ClearCommand
public DisplayerCommand ClearCommand { get; }
Property Value
- DisplayerCommand
ContinueCommand
public DisplayerCommand ContinueCommand { get; }
Property Value
- DisplayerCommand
Limit
[Range(0, 1.7976931348623157E+308)]
public double Limit { get; set; }
Property Value
- double
_end
protected Point? _end { get; set; }
Property Value
- Point?
_start
protected Point? _start { get; set; }
Property Value
- Point?
Methods
AddShape()
protected virtual void AddShape()
CanAddShape()
protected virtual bool CanAddShape()
Returns
- bool
Cancel()
protected virtual void Cancel()
Clear()
public override void Clear()
Draw(IDrawing)
public override void Draw(IDrawing dc)
Parameters
dc IDrawing
DrawDimension(IDrawing)
protected virtual void DrawDimension(IDrawing dc)
Parameters
dc IDrawing
DrawDimension(IDrawing, Point, Point, double)
protected void DrawDimension(IDrawing dc, Point from, Point to, double offset = 20)
Parameters
dc IDrawing
from Point
to Point
offset double
DrawLine(IDrawing, Point, Point)
protected void DrawLine(IDrawing dc, Point point1, Point point2)
Parameters
dc IDrawing
point1 Point
point2 Point
DrawPoint(IDrawing)
protected virtual void DrawPoint(IDrawing dc)
Parameters
dc IDrawing
DrawPoint(IDrawing, Point, double)
protected void DrawPoint(IDrawing dc, Point point, double len = 2)
Parameters
dc IDrawing
point Point
len double
DrawSubline(IDrawing)
protected virtual void DrawSubline(IDrawing dc)
Parameters
dc IDrawing
OnIsVisibleChanged(bool, bool)
protected override void OnIsVisibleChanged(bool o, bool n)
Parameters
o bool
n bool
public override void OnMouseDown(object sender, MouseButtonEventArgs e)
Parameters
sender object
e MouseButtonEventArgs
public override void OnMouseMove(object sender, MouseEventArgs e)
Parameters
sender object
e MouseEventArgs
public override void OnMouseUp(object sender, MouseButtonEventArgs e)
Parameters
sender object
e MouseButtonEventArgs
RefreshShape(Point, Point)
protected virtual void RefreshShape(Point start, Point end)
Parameters
start Point
end Point