Beispiel #1
0
 public SketchBitmap(SketchLayer layer, SketchImage image) : base(layer)
 {
     if (!layer.Style.HasValue)
     {
         throw new SketchParserException($"Expected '{layer.Name}' to have a style, but didn't find one.");
     }
     Image = image;
 }
Beispiel #2
0
 public SketchShapePath(
     SketchLayer layer,
     SketchPath path,
     SketchBooleanOperation operation)
     : base(layer)
 {
     Path             = path;
     BooleanOperation = operation;
 }
Beispiel #3
0
 public SketchText(SketchLayer layer,
                   SketchAttributedString attributedString,
                   SketchTextBoxAlignment textBoxAlignment) : base(layer)
 {
     if (!layer.Style.HasValue)
     {
         throw new SketchParserException($"Expected '{layer.Name}' to have a style, but didn't find one.");
     }
     AttributedString = attributedString;
     TextBoxAlignment = textBoxAlignment;
 }
 public SketchShapeGroup(
     SketchLayer parentLayer,
     bool hasClippingMask
     ) : base(parentLayer)
 {
     if (!parentLayer.Style.HasValue)
     {
         throw new SketchParserException($"Expected '{parentLayer.Name}' to have a style, but didn't find one.");
     }
     HasClippingMask = hasClippingMask;
 }
Beispiel #5
0
 // possibly temp while refactoring
 public SketchLayer(SketchLayer layer, IReadOnlyList <SketchLayer> children)
     : this(layer.Id,
            layer.Parent,
            layer.Frame,
            layer.Name,
            layer.NameIsFixed,
            layer.Alignment,
            layer.Rotation,
            layer.IsFlippedVertical,
            layer.IsFlippedHorizontal,
            layer.Style,
            children)
 {
 }
Beispiel #6
0
 public SketchLayer(SketchLayer layer)
     : this(layer.Id,
            layer.Parent,
            layer.Frame,
            layer.Name,
            layer.NameIsFixed,
            layer.Alignment,
            layer.Rotation,
            layer.IsFlippedVertical,
            layer.IsFlippedHorizontal,
            layer.Style,
            layer.Layers)
 {
 }
Beispiel #7
0
 public SketchLayer(
     Guid id,
     SketchLayer parent,
     SketchRect frame,
     string name,
     bool nameIsFixed,
     SketchAlignment alignment,
     double rotation,
     bool flippedVertical,
     bool flippedHorizontal,
     Optional <SketchStyle> style,
     IReadOnlyList <SketchLayer> children) : base(id)
 {
     Parent              = parent;
     Frame               = frame;
     Name                = name;
     NameIsFixed         = nameIsFixed;
     Alignment           = alignment;
     Rotation            = rotation;
     IsFlippedVertical   = flippedVertical;
     IsFlippedHorizontal = flippedHorizontal;
     Style               = style;
     Layers              = children;
 }
Beispiel #8
0
 public SketchSymbolInstance(SketchLayer layer, Guid symbolId) : base(layer)
 {
     SymbolId = symbolId;
 }
Beispiel #9
0
 public SketchSymbolMaster(SketchLayer parentLayer, Guid symbolId) : base(parentLayer)
 {
     SymbolId = symbolId;
 }