public ImageInfo RenderMPTG(String symbolID, Dictionary <int, String> modifiers, Dictionary <int, String> attributes) { ImageInfo returnVal = null; Color lineColor = Colors.Transparent; int pixelSize = 35; if (attributes.ContainsKey(MilStdAttributes.LineColor)) { lineColor = RenderUtilities.DrawingColorToUIColor(SymbolUtilities.getColorFromHexString(attributes[MilStdAttributes.LineColor])); } else { lineColor = RenderUtilities.DrawingColorToUIColor(SymbolUtilities.getLineColorOfAffiliation(symbolID)); } if (attributes.ContainsKey(MilStdAttributes.PixelSize)) { pixelSize = Convert.ToInt32(attributes[MilStdAttributes.PixelSize]); } returnVal = TacticalGraphicIconRenderer.getIcon(symbolID, pixelSize, lineColor, 0); return(returnVal); }
public ImageInfo Render(String symbolID, Dictionary <int, String> modifiers, Dictionary <int, String> attributes, CanvasDevice device) { SinglePointRenderer spr = SinglePointRenderer.getInstance(); int symStd = 1; if (modifiers != null && modifiers[MilStdAttributes.SymbologyStandard] != null) { symStd = Convert.ToInt32(modifiers[MilStdAttributes.SymbologyStandard]); } else { if (modifiers == null) { modifiers = new Dictionary <int, String>(); } modifiers[MilStdAttributes.SymbologyStandard] = Convert.ToString(RendererSettings.getInstance().getSymbologyStandard()); } var basicID = SymbolUtilities.getBasicSymbolIDStrict(symbolID); if (SymbolUtilities.isTacticalGraphic(symbolID)) { SymbolDef sd = SymbolDefTable.getInstance().getSymbolDef(basicID, symStd); if (sd == null) { sd = SymbolDefTable.getInstance().getSymbolDef(basicID, symStd); } if (sd != null && sd.getDrawCategory() == SymbolDef.DRAW_CATEGORY_POINT) { return(spr.RenderSPTG(symbolID, modifiers, attributes)); } else { Color color = RenderUtilities.DrawingColorToUIColor(SymbolUtilities.getLineColorOfAffiliation(symbolID)); int size = 35; if (attributes.ContainsKey(MilStdAttributes.PixelSize)) { size = int.Parse(attributes[MilStdAttributes.PixelSize]); } if (modifiers.ContainsKey(MilStdAttributes.LineColor)) { color = RenderUtilities.getColorFromHexString(modifiers[MilStdAttributes.LineColor]); } if (modifiers.ContainsKey(MilStdAttributes.PixelSize)) { size = int.Parse(modifiers[MilStdAttributes.PixelSize]); } return(TacticalGraphicIconRenderer.getIcon(symbolID, size, color, 0)); } } else if (UnitFontLookup.getInstance().getLookupInfo(basicID) != null) { return(spr.RenderUnit(symbolID, modifiers, attributes, device)); } else { //symbolID = SymbolUtilities.reconcileSymbolID(symbolID, false); return(spr.RenderUnit(symbolID, modifiers, attributes, null)); } }
private ImageInfo renderTacticalMultipointIcon(String symbolID) { return(TacticalGraphicIconRenderer.getIcon(symbolID, 30, Colors.Red, 0)); //return spr.renderTacticalMultipointIcon(symbolID, modifiers); }