virtual public object Clone(CloneOptions options) { var display = options?.Display; if (display == null) { return(this.Clone()); } float fac = 1; if (options.ApplyRefScale) { fac = ReferenceScaleHelper.RefscaleFactor( (float)(display.refScale / display.mapScale), _font.Size, MinFontSize, MaxFontSize); fac = options.LabelRefScaleFactor(fac); } fac *= options.DpiFactor; SimpleTextSymbol tSym = new SimpleTextSymbol(Current.Engine.CreateFont(_font.Name, Math.Max(_font.Size * fac / display.Screen.LargeFontsFactor, 2), _font.Style), _brush.Color); tSym.HorizontalOffset = HorizontalOffset * fac; tSym.VerticalOffset = VerticalOffset * fac; tSym.Angle = Angle; tSym._align = _align; tSym.Smoothingmode = this.Smoothingmode; tSym.IncludesSuperScript = this.IncludesSuperScript; tSym.SecondaryTextSymbolAlignments = this.SecondaryTextSymbolAlignments; return(tSym); }
virtual public object Clone(IDisplay display) { if (display == null) { return(this.Clone()); } float fac = 1; if (display.refScale > 1) { fac = ReferenceScaleHelper.RefscaleFactor( (float)(display.refScale / display.mapScale), _font.Size, MinFontSize, MaxFontSize); } if (display.dpi != 96.0) { fac *= (float)(display.dpi / 96.0); } SimpleTextSymbol tSym = new SimpleTextSymbol(new Font(_font.Name, Math.Max(_font.Size * fac, 2), _font.Style), _brush.Color); tSym.HorizontalOffset = HorizontalOffset * fac; tSym.VerticalOffset = VerticalOffset * fac; tSym.Angle = Angle; tSym._align = _align; tSym.Smoothingmode = this.Smoothingmode; return(tSym); }
public object Clone(CloneOptions options) { var display = options?.Display; if (display == null) { return(Clone()); } float fac = 1; if (_widthUnit == DrawingUnit.Pixel) { fac = ReferenceScaleHelper.CalcPixelUnitFactor(options); } else if (_widthUnit != DrawingUnit.Pixel && _pen.Width > 0) { float pix = (float)(display.mapScale / (display.dpi / 0.0254)); if (pix == 0f) { fac = 0; } else { fac = 1f / pix; } } SimpleLineSymbol clone = new SimpleLineSymbol(_color, ReferenceScaleHelper.PenWidth(_pen.Width * fac, this, display)); clone.DashStyle = this.DashStyle; clone.LineStartCap = this.LineStartCap; clone.LineEndCap = this.LineEndCap; clone.Smoothingmode = this.Smoothingmode; clone.LegendLabel = _legendLabel; clone.MinPenWidth = _minWidth; clone.MaxPenWidth = _maxWidth; clone.PenWidthUnit = _widthUnit; return(clone); }
public object Clone(CloneOptions options) { var display = options?.Display; if (display == null) { return(Clone()); } float fac = 1; if (options.ApplyRefScale) { fac = ReferenceScaleHelper.RefscaleFactor( (float)(display.refScale / display.mapScale), this.SymbolSize, this.MinSymbolSize, this.MaxSymbolSize); fac = options.RefScaleFactor(fac); } fac *= options.DpiFactor; TrueTypeMarkerSymbol marker = new TrueTypeMarkerSymbol(Current.Engine.CreateFont(Font.Name, Math.Max(Font.Size * fac / display.Screen.LargeFontsFactor, 2f), _font.Style), _brush.Color); marker.Angle = Angle; marker.HorizontalOffset = HorizontalOffset * fac; marker.VerticalOffset = VerticalOffset * fac; marker._char = _char; marker.LegendLabel = _legendLabel; marker.MaxSymbolSize = this.MaxSymbolSize; marker.MinSymbolSize = this.MinSymbolSize; CloneEngineOffsets(marker._engineOffset); return(marker); }
public object Clone(CloneOptions options) { var display = options?.Display; if (display == null) { return(Clone()); } float fac = ReferenceScaleHelper.CalcPixelUnitFactor(options); RasterMarkerSymbol marker = new RasterMarkerSymbol(); marker.Angle = Angle; marker.HorizontalOffset = HorizontalOffset * fac; marker.VerticalOffset = VerticalOffset * fac; marker.SizeX = _sizeX * fac; marker.SizeY = _sizeY * fac; marker.Filename = _filename; marker.LegendLabel = _legendLabel; return(marker); }
public object Clone(CloneOptions options) { var display = options?.Display; if (display == null) { return(Clone()); } float fac = 1; if (options.ApplyRefScale) { fac = ReferenceScaleHelper.RefscaleFactor( (float)(display.refScale / display.mapScale), this.SymbolSize, this.MinSymbolSize, this.MaxSymbolSize); fac = options.RefScaleFactor(fac); } fac *= options.DpiFactor; SimplePointSymbol pSym = new SimplePointSymbol(_pen.Color, _pen.Width * fac, _brush.Color); pSym._size = Math.Max(_size * fac, 1f); pSym._symbolWidth = _symbolWidth * fac; pSym.Angle = Angle; pSym.Marker = _type; pSym.HorizontalOffset = HorizontalOffset * fac; pSym.VerticalOffset = VerticalOffset * fac; pSym.LegendLabel = _legendLabel; pSym.Smoothingmode = this.Smoothingmode; pSym.MaxSymbolSize = this.MaxSymbolSize; pSym.MinSymbolSize = this.MinSymbolSize; return(pSym); }