private static IPaint CreatePaintFront(IGraphicFactory graphicFactory, DisplayModel displayModel) { IPaint paint = graphicFactory.CreatePaint(); paint.Color = Color.RED; paint.SetTypeface(FontFamily.DEFAULT, FontStyle.BOLD); paint.TextSize = 25 * displayModel.ScaleFactor; return(paint); }
private static IPaint CreateLineBack(IGraphicFactory graphicFactory, DisplayModel displayModel) { IPaint paint = graphicFactory.CreatePaint(); paint.Color = Color.WHITE; paint.StrokeWidth = 4 * displayModel.ScaleFactor; paint.Style = Style.STROKE; return(paint); }
private static IPaint createPaintFront(IGraphicFactory graphicFactory, DisplayModel displayModel) { IPaint paint = graphicFactory.CreatePaint(); paint.Color = Color.RED; paint.StrokeWidth = 2 * displayModel.ScaleFactor; paint.Style = Style.STROKE; return(paint); }
public PathText(IGraphicFactory graphicFactory, DisplayModel displayModel, string elementName, XmlReader reader) : base(graphicFactory, displayModel) { this.fill = graphicFactory.CreatePaint(); this.fill.Color = Color.BLACK; this.fill.Style = Style.FILL; this.fill.TextAlign = Align.CENTER; this.fills = new Dictionary <sbyte?, IPaint>(); this.stroke = graphicFactory.CreatePaint(); this.stroke.Color = Color.BLACK; this.stroke.Style = Style.STROKE; this.stroke.TextAlign = Align.CENTER; this.strokes = new Dictionary <sbyte?, IPaint>(); this.dyScaled = new Dictionary <sbyte?, float?>(); this.display = Display.IFSPACE; ExtractValues(graphicFactory, displayModel, elementName, reader); }
public Area(IGraphicFactory graphicFactory, DisplayModel displayModel, string elementName, XmlReader reader, int level, string relativePathPrefix) : base(graphicFactory, displayModel) { this.level = level; this.relativePathPrefix = relativePathPrefix; this.fill = graphicFactory.CreatePaint(); this.fill.Color = Color.TRANSPARENT; this.fill.Style = Style.FILL; this.fill.StrokeCap = Cap.ROUND; this.stroke = graphicFactory.CreatePaint(); this.stroke.Color = Color.TRANSPARENT; this.stroke.Style = Style.STROKE; this.stroke.StrokeCap = Cap.ROUND; this.strokes = new Dictionary <sbyte?, IPaint>(); ExtractValues(elementName, reader); }
private static IPaint CreatePaintBack(IGraphicFactory graphicFactory, DisplayModel displayModel) { IPaint paint = graphicFactory.CreatePaint(); paint.Color = Color.WHITE; paint.SetTypeface(FontFamily.DEFAULT, FontStyle.BOLD); paint.TextSize = 25 * displayModel.ScaleFactor; paint.StrokeWidth = 2 * displayModel.ScaleFactor; paint.Style = Style.STROKE; return(paint); }
public Line(IGraphicFactory graphicFactory, DisplayModel displayModel, string elementName, XmlReader reader, int level, string relativePathPrefix) : base(graphicFactory, displayModel) { this.level = level; this.relativePathPrefix = relativePathPrefix; this.stroke = graphicFactory.CreatePaint(); this.stroke.Color = Color.BLACK; this.stroke.Style = Style.STROKE; this.stroke.StrokeCap = Cap.ROUND; this.stroke.StrokeJoin = Join.Round; this.strokes = new Dictionary <sbyte?, IPaint>(); this.dyScaled = new Dictionary <sbyte?, float?>(); ExtractValues(graphicFactory, displayModel, elementName, reader, relativePathPrefix); }
public Circle(IGraphicFactory graphicFactory, DisplayModel displayModel, string elementName, XmlReader reader, int level) : base(graphicFactory, displayModel) { this.level = level; this.fill = graphicFactory.CreatePaint(); this.fill.Color = Color.TRANSPARENT; this.fill.Style = Style.FILL; this.fills = new Dictionary <sbyte?, IPaint>(); this.stroke = graphicFactory.CreatePaint(); this.stroke.Color = Color.TRANSPARENT; this.stroke.Style = Style.STROKE; this.strokes = new Dictionary <sbyte?, IPaint>(); this.renderRadiusScaled = new Dictionary <sbyte?, float?>(); ExtractValues(graphicFactory, displayModel, elementName, reader); if (!this.scaleRadius) { this.renderRadius = this.radius; this.stroke.StrokeWidth = this.strokeWidth; } }
public Caption(IGraphicFactory graphicFactory, DisplayModel displayModel, string elementName, XmlReader reader, IDictionary <string, Symbol> symbols) : base(graphicFactory, displayModel) { this.fill = graphicFactory.CreatePaint(); this.fill.Color = Color.BLACK; this.fill.Style = Style.FILL; this.fills = new Dictionary <sbyte?, IPaint>(); this.stroke = graphicFactory.CreatePaint(); this.stroke.Color = Color.BLACK; this.stroke.Style = Style.STROKE; this.strokes = new Dictionary <sbyte?, IPaint>(); this.dyScaled = new Dictionary <sbyte?, float?>(); this.display = Display.IFSPACE; this.gap = DEFAULT_GAP * displayModel.ScaleFactor; ExtractValues(graphicFactory, displayModel, elementName, reader); if (!string.ReferenceEquals(this.symbolId, null)) { Symbol symbol = symbols[this.symbolId]; if (symbol != null) { this.bitmap = symbol.Bitmap; } } if (this.position == null) { // sensible defaults: below if symbolContainer is present, center if not if (this.bitmap == null) { this.position = Position.CENTER; } else { this.position = Position.BELOW; } } else if (this.position == Position.CENTER || this.position == Position.BELOW || this.position == Position.ABOVE) { this.stroke.TextAlign = Align.CENTER; this.fill.TextAlign = Align.CENTER; } else if (this.position == Position.BELOW_LEFT || this.position == Position.ABOVE_LEFT || this.position == Position.LEFT) { this.stroke.TextAlign = Align.RIGHT; this.fill.TextAlign = Align.RIGHT; } else if (this.position == Position.BELOW_RIGHT || this.position == Position.ABOVE_RIGHT || this.position == Position.RIGHT) { this.stroke.TextAlign = Align.LEFT; this.fill.TextAlign = Align.LEFT; } else { throw new System.ArgumentException("Position invalid"); } this.maxTextWidth = displayModel.MaxTextWidth; }