Exemplo n.º 1
0
 public void SetSize(int PanelWidth, int PanelHeight, wRectangle CropRectangle, double ViewScale)
 {
     Width  = PanelWidth;
     Height = PanelHeight;
     Crop   = CropRectangle;
     Scale  = ViewScale;
 }
Exemplo n.º 2
0
        public void Clear()
        {
            Shapes.Clear();

            Graphics = new wGraphic();
            Effects  = new wEffects();
            Fonts    = new wFont();

            Boundary = new wRectangle();
        }
Exemplo n.º 3
0
        public void SetCanvasSize(wRectangle FrameRectangle, wRectangle BoundaryRectangle)
        {
            Boundary = BoundaryRectangle;
            Frame    = FrameRectangle;

            Center = new System.Drawing.Point((int)(Frame.Width / 2), (int)(Frame.Height / 2));

            group.Boundary.Width  = Frame.Width;
            group.Boundary.Height = Frame.Height;

            Element.Width  = Frame.Width;
            Element.Height = Frame.Height;
        }
Exemplo n.º 4
0
        public void SetScale()
        {
            double X = (Frame.Width / Boundary.Width);
            double Y = (Frame.Height / Boundary.Height);

            if (X < Y)
            {
                Scale = X;
            }
            else
            {
                Scale = Y;
            }

            double W = Boundary.Width * Scale;
            double H = Boundary.Height * Scale;

            Extents = new wRectangle(new wPlane(new wPoint(Boundary.Center.X * Scale, Boundary.Center.Y * Scale, 0), Boundary.Plane.XAxis, Boundary.Plane.YAxis), Boundary.Width * Scale, Boundary.Height * Scale);

            wVector Shift = new wVector(Frame.Center, Extents.Center);

            Xform.Children.Clear();
            Xform.Children.Add(new TranslateTransform(Shift.X, Shift.Y));
        }
Exemplo n.º 5
0
 public void SetSize(int Width, int Height, wRectangle CropBoundary, double Scale)
 {
     Doc.SetSize(Width, Height, CropBoundary, Scale);
 }