private static VObject CreateShapeVObject(PsdShapeFrame frame) { if (frame.Width == 0 || frame.Height == 0) { return(null); } var brush = frame.Brush as SolidBrush; var path = frame.VectorMask != null?Path.FromAdvancedPath(frame.VectorMask) : null; if (path != null) { path.Scale(72 / frame.DpiX, 72 / frame.DpiY); } var shapeVObject = new ShapeVObject { Path = path, Opacity = frame.Opacity, BorderColor = frame.Pen != null ? frame.Pen.Color : ColorManagement.GetBlackColor(frame.ColorSpace), BorderWidth = frame.Pen != null ? frame.Pen.Width : 0, FillColor = brush != null ? brush.Color : ColorManagement.GetTransparentColor(frame.ColorSpace) }; return(shapeVObject); }
public ShapeVObjectData(ShapeVObject obj) : base(obj) { Pth = obj.Path.ToSvgString(); BC = obj.BorderColor; BW = obj.BorderWidth; FC = obj.FillColor; FBW = obj.FixedBorderWidth; }