public new FillableProperty Clone() { FillableProperty fp = new FillableProperty(); fp.Antialias = this.Antialias; fp.PenWidth = this.PenWidth; fp.StrokeColor = this.StrokeColor; fp.LineDash = this.LineDash; fp.StartLineCap = this.StartLineCap; fp.EndLineCap = this.EndLineCap; fp.PenAlign = this.PenAlign; fp.HowLineJoin = this.HowLineJoin; fp.PaintType = this.PaintType; fp.FillType = this.FillType; fp.FillColor = this.FillColor; return(fp); }
public RectShape(EPKernel container, FillableProperty pro, EPCanvas p, AdItemType rt) : this(container, pro) { parent = p; ItemType = rt; switch (ItemType) { case AdItemType.Video: Prop = new Video(); break; case AdItemType.Picture: Prop = new Picture(); break; case AdItemType.Subtitle: Prop = new Subtitle(); break; default: break; } }
//public LocationChgEventArgs LastLocation; public RectShape(EPKernel container, FillableProperty pro) : base(container, pro) { initialProperties(); initialHotspotRects(); }
private void CheckShapeProperty() { if (currentTool != ToolType.ShapeSelect || SelectedShapesCount != 1) { return; } bool diff = false; BaseProperty basepro = shapesList[selectedShapesIndexList[0]].ShapeProperty; if (proCollector.Antialias != basepro.Antialias) { proCollector.Antialias = basepro.Antialias; diff = true; } if (basepro is IndicatorArrowProperty) { IndicatorArrowProperty ip = (IndicatorArrowProperty)basepro; if (ip.LineColor != proCollector.StrokeColor || ip.LineSize != proCollector.IndicatorLineSize) { diff = true; proCollector.StrokeColor = ip.LineColor; proCollector.IndicatorLineSize = ip.LineSize; } } if (basepro is StrokableProperty) { StrokableProperty sp = (StrokableProperty)basepro; if (proCollector.PenWidth != sp.PenWidth || proCollector.StrokeColor != sp.StrokeColor || proCollector.LineDash != sp.LineDash || proCollector.StartLineCap != sp.StartLineCap || proCollector.EndLineCap != sp.EndLineCap || proCollector.PenAlign != sp.PenAlign || proCollector.HowLineJoin != sp.HowLineJoin) { diff = true; proCollector.PenWidth = sp.PenWidth; proCollector.StrokeColor = sp.StrokeColor; proCollector.LineDash = sp.LineDash; proCollector.StartLineCap = sp.StartLineCap; proCollector.EndLineCap = sp.EndLineCap; proCollector.PenAlign = sp.PenAlign; proCollector.HowLineJoin = sp.HowLineJoin; } } if (basepro is FillableProperty) { FillableProperty fp = (FillableProperty)basepro; if (proCollector.PaintType != fp.PaintType || proCollector.FillColor != fp.FillColor || proCollector.FillType != fp.FillType) { diff = true; proCollector.PaintType = fp.PaintType; proCollector.FillColor = fp.FillColor; proCollector.FillType = fp.FillType; } } if (basepro is RoundedRectProperty) { RoundedRectProperty rp = (RoundedRectProperty)basepro; if (proCollector.RadiusAll != rp.RadiusAll) { diff = true; proCollector.RadiusAll = rp.RadiusAll; } } if (diff) { OnPropertyCollectorChanged(EventArgs.Empty); } }
protected override void AfterPropertyChanged(BaseProperty oldValue, BaseProperty newValue) { base.AfterPropertyChanged(oldValue, newValue); _pro = (FillableProperty)newValue; SetNewBrush(); }
public FillableShape(EPKernel container, FillableProperty property) : base(container, property) { _pro = property; SetNewBrush(); }
public EllipseShape(EPKernel container, FillableProperty pro) : base(container, pro) { }