public object Clone(CloneOptions options) { var display = options?.Display; if (display == null) { return(Clone()); } float fac = 1; if (options.ApplyRefScale) { fac = (float)(display.refScale / display.mapScale); fac = options.RefScaleFactor(fac); } fac *= options.DpiFactor; HatchSymbol hSym = new HatchSymbol(_forecolor, _backcolor, _hatchStyle); if (_outlineSymbol != null) { hSym._outlineSymbol = (ISymbol)_outlineSymbol.Clone(options); } hSym.LegendLabel = _legendLabel; return(hSym); }
public object Clone(CloneOptions options) { var display = options?.Display; if (display == null) { return(Clone()); } float fac = 1; if (options.ApplyRefScale) { fac = (float)(display.refScale / display.mapScale); fac = options.RefScaleFactor(fac); } if (display.dpi != 96.0) { fac *= (float)(display.dpi / 96.0); } GradientFillSymbol fSym = new GradientFillSymbol(_gradient); if (_outlineSymbol != null) { fSym._outlineSymbol = (ISymbol)_outlineSymbol.Clone(options); } fSym._rectType = _rectType; fSym.LegendLabel = _legendLabel; return(fSym); }
public object Clone(CloneOptions options) { var display = options?.Display; if (display == null) { return(Clone()); } float fac = 1; if (options.ApplyRefScale && display.mapScale >= 1) { fac = (float)(display.refScale / display.mapScale); fac = options.RefScaleFactor(fac); } fac *= options.DpiFactor; SymbolDotedLineSymbol cloneSym = new SymbolDotedLineSymbol(); if (this.LineSymbol != null) { cloneSym.LineSymbol = this.LineSymbol.Clone(options) as ILineSymbol; } if (this.PointSymbol != null) { cloneSym.PointSymbol = this.PointSymbol.Clone(options) as IPointSymbol; } cloneSym.LegendLabel = _legendLabel; cloneSym.DrawStartPoint = this.DrawStartPoint; cloneSym.DrawEndPoint = this.DrawEndPoint; cloneSym.DrawStepPoints = this.DrawStepPoints; cloneSym.StepWidthUnit = this.StepWidthUnit; cloneSym.SymbolMaxDistance = (int)((float)this.SymbolMaxDistance * fac); switch (cloneSym.StepWidthUnit) { case StepWidthUnit.Pixel: cloneSym.StepWidth = (int)((float)this.StepWidth * fac); cloneSym.StepStartPos = (int)((float)this.StepStartPos * fac); break; default: cloneSym.StepWidth = this.StepWidth; cloneSym.StepStartPos = this.StepStartPos; break; } cloneSym.UseSymbolRotation = this.UseSymbolRotation; return(cloneSym); }
static public float CalcPixelUnitFactor(CloneOptions options) { float fac = 1f; var display = options.Display; if (display != null) { if (options.ApplyRefScale) { fac = (float)(display.refScale / display.mapScale); fac = options.RefScaleFactor(fac); } fac *= options.DpiFactor; } return(fac); }
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 = 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); }