Exemplo n.º 1
0
        public TransformHandle(MoonlightController controller, IHandleGroup group, ILocator locator)
            : base(controller, group)
        {
            Locator = locator;

            rotation = new RotateTransform();
            Transforms.Children.Add(rotation);
        }
Exemplo n.º 2
0
        public StartPointHandle(MoonlightController controller, IHandleGroup group, PathFigure pathFigure)
            : base(controller, group)
        {
            if (pathFigure == null)
                throw new ArgumentNullException("PathFigure");

            path_figure = pathFigure;
        }
Exemplo n.º 3
0
        public PathSegmentHandle(MoonlightController controller, IHandleGroup group, PathSegment seg, DependencyProperty point)
            : base(controller, group)
        {
            if (seg == null)
                throw new ArgumentNullException("seg");

            if (point == null)
                throw new ArgumentNullException("point");
            segment = seg;
            point_property = point;
        }
Exemplo n.º 4
0
        public AbstractHandle(MoonlightController controller, IHandleGroup group)
            : base()
        {
            Group = group;

            //inner = controller.GtkSilver.InitializeFromXaml(GetXaml(), this);
            //Application.LoadComponent(this, new Uri("ellipse.xml", UriKind.Relative));
            Content = CreateContent();

            Content.MouseLeftButtonDown += MouseStart;
            Content.MouseLeftButtonUp += MouseEnd;
            Content.MouseMove += MouseStep;

            highlight_fill = new SolidColorBrush(Colors.Red);
            normal_fill = (Brush) Content.GetValue(Shape.FillProperty);

            Content.MouseEnter += delegate {
                Content.SetValue(Shape.FillProperty, highlight_fill);
            };

            Content.MouseLeave += delegate {
                Content.SetValue(Shape.FillProperty, normal_fill);
            };

            SetValue(Canvas.ZIndexProperty, int.MaxValue);

            transforms = new TransformGroup();
            scaleTransform = new ScaleTransform();
            transforms.Children.Add(scaleTransform);
            Content.SetValue(UIElement.RenderTransformOriginProperty, new Point(0.5, 0.5));
             	Content.SetValue(UIElement.RenderTransformProperty, transforms);

            undo_group = new UndoGroup();

            Controller.ZoomChanged += delegate {
                Update();
            };
        }
Exemplo n.º 5
0
 public ResizeHandle(MoonlightController controller, IHandleGroup group, ILocator locator)
     : base(controller, group, locator)
 {
 }
Exemplo n.º 6
0
 public StartLineHandle(MoonlightController controller, IHandleGroup group)
     : base(controller, group)
 {
 }
Exemplo n.º 7
0
 public LineSegmentHandle(MoonlightController controller, IHandleGroup group, PathSegment seg)
     : base(controller, group, seg, LineSegment.PointProperty)
 {
 }
 public BezierSegmentPoint3Handle(MoonlightController controller, IHandleGroup group, BezierSegment seg)
     : base(controller, group)
 {
     segment = seg;
 }
Exemplo n.º 9
0
 public PointHandle(MoonlightController controller, IHandleGroup group)
     : base(controller, group)
 {
 }
Exemplo n.º 10
0
 public PolyLineHandle(MoonlightController controller, IHandleGroup group, int i)
     : base(controller, group)
 {
     index = i;
 }