public void SetSize(int PanelWidth, int PanelHeight, wRectangle CropRectangle, double ViewScale) { Width = PanelWidth; Height = PanelHeight; Crop = CropRectangle; Scale = ViewScale; }
public void Clear() { Shapes.Clear(); Graphics = new wGraphic(); Effects = new wEffects(); Fonts = new wFont(); Boundary = new wRectangle(); }
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; }
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)); }
public void SetSize(int Width, int Height, wRectangle CropBoundary, double Scale) { Doc.SetSize(Width, Height, CropBoundary, Scale); }