|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using Kingo.Mobile.Shape2KOTool.XSDClass;
|
|
|
|
|
|
|
|
|
|
namespace Kingo.Mobile.Shape2KOTool.KoDataBase
|
|
|
|
|
{
|
|
|
|
|
// Token: 0x02000045 RID: 69
|
|
|
|
|
public class AdvancedDrawimgInfoManager
|
|
|
|
|
{
|
|
|
|
|
// Token: 0x06000222 RID: 546 RVA: 0x0000AB34 File Offset: 0x00008D34
|
|
|
|
|
public string GetRenderer(Renderer itemInfoRender, LabelingInfo lablingInfo)
|
|
|
|
|
{
|
|
|
|
|
AdvancedDrawingInfo advancedDrawingInfo = new AdvancedDrawingInfo();
|
|
|
|
|
string result;
|
|
|
|
|
if (itemInfoRender is SimpleRenderer)
|
|
|
|
|
{
|
|
|
|
|
Symbol symbol = (itemInfoRender as SimpleRenderer).Symbol;
|
|
|
|
|
string text = "";
|
|
|
|
|
if (symbol is FSymbol)
|
|
|
|
|
{
|
|
|
|
|
text = this.GetFillAdvanced(symbol as FSymbol, lablingInfo);
|
|
|
|
|
}
|
|
|
|
|
else if (symbol is MSymbol)
|
|
|
|
|
{
|
|
|
|
|
text = this.GetMarkerAdvanced(symbol as MSymbol, lablingInfo);
|
|
|
|
|
}
|
|
|
|
|
else if (symbol is LSymbol)
|
|
|
|
|
{
|
|
|
|
|
text = this.GetLineAdvanced(symbol as LSymbol, lablingInfo);
|
|
|
|
|
}
|
|
|
|
|
result = text;
|
|
|
|
|
}
|
|
|
|
|
else if (itemInfoRender is UniqueValueRenderer)
|
|
|
|
|
{
|
|
|
|
|
UniqueValueRenderer uniqueValueRenderer = itemInfoRender as UniqueValueRenderer;
|
|
|
|
|
UniqueValueRenderer uniqueValueRenderer2 = new UniqueValueRenderer
|
|
|
|
|
{
|
|
|
|
|
Field1 = uniqueValueRenderer.Field1,
|
|
|
|
|
Field2 = uniqueValueRenderer.Field2,
|
|
|
|
|
Field3 = uniqueValueRenderer.Field3,
|
|
|
|
|
DefaultLabel = uniqueValueRenderer.DefaultLabel,
|
|
|
|
|
FieldDelimiter = uniqueValueRenderer.FieldDelimiter
|
|
|
|
|
};
|
|
|
|
|
CIMSymbolReference cimsymbolReference = this.GetCIMSymbolReference(uniqueValueRenderer.DefaultSymbol as FSymbol);
|
|
|
|
|
uniqueValueRenderer2.DefaultSymbol = cimsymbolReference;
|
|
|
|
|
for (int i = 0; i < uniqueValueRenderer.UniqueValueInfos.Count; i++)
|
|
|
|
|
{
|
|
|
|
|
UniqueValueInfo uniqueValueInfo = uniqueValueRenderer.UniqueValueInfos[i];
|
|
|
|
|
UniqueValueInfo uniqueValueInfo2 = new UniqueValueInfo
|
|
|
|
|
{
|
|
|
|
|
Label = uniqueValueInfo.Label,
|
|
|
|
|
Description = uniqueValueInfo.Description,
|
|
|
|
|
Value = uniqueValueInfo.Value
|
|
|
|
|
};
|
|
|
|
|
CIMSymbolReference cimsymbolReference2 = this.GetCIMSymbolReference(uniqueValueInfo.Symbol as FSymbol);
|
|
|
|
|
cimsymbolReference2.SymbolName = "Symbol_" + (i + 2).ToString();
|
|
|
|
|
uniqueValueInfo2.Symbol = cimsymbolReference2;
|
|
|
|
|
uniqueValueRenderer2.UniqueValueInfos.Add(uniqueValueInfo2);
|
|
|
|
|
}
|
|
|
|
|
advancedDrawingInfo.DrawingInfo.Renderer = uniqueValueRenderer2;
|
|
|
|
|
if (lablingInfo != null)
|
|
|
|
|
{
|
|
|
|
|
advancedDrawingInfo.DrawingInfo.LabelingInfo = new List<LabelingInfo>();
|
|
|
|
|
advancedDrawingInfo.DrawingInfo.LabelingInfo.Add(lablingInfo);
|
|
|
|
|
}
|
|
|
|
|
result = advancedDrawingInfo.ToJson();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
result = null;
|
|
|
|
|
}
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000223 RID: 547 RVA: 0x0000AD78 File Offset: 0x00008F78
|
|
|
|
|
public string GetFillAdvanced(FSymbol symbol, LabelingInfo lablingInfo)
|
|
|
|
|
{
|
|
|
|
|
AdvancedDrawingInfo advancedDrawingInfo = new AdvancedDrawingInfo();
|
|
|
|
|
SimpleRenderer simpleRenderer = new SimpleRenderer();
|
|
|
|
|
advancedDrawingInfo.DrawingInfo.Renderer = simpleRenderer;
|
|
|
|
|
CIMSymbolReference cimsymbolReference = new CIMSymbolReference
|
|
|
|
|
{
|
|
|
|
|
SymbolName = "Symbol_1"
|
|
|
|
|
};
|
|
|
|
|
simpleRenderer.Symbol = cimsymbolReference;
|
|
|
|
|
CIMPolygonSymbol cimpolygonSymbol = new CIMPolygonSymbol();
|
|
|
|
|
cimsymbolReference.Symbol = cimpolygonSymbol;
|
|
|
|
|
List<SymbolLayer> cimfill = this.GetCIMFill(symbol);
|
|
|
|
|
if (cimfill != null && cimfill.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
cimpolygonSymbol.SymbolLayers.AddRange(cimfill);
|
|
|
|
|
}
|
|
|
|
|
if (lablingInfo != null)
|
|
|
|
|
{
|
|
|
|
|
advancedDrawingInfo.DrawingInfo.LabelingInfo = new List<LabelingInfo>();
|
|
|
|
|
advancedDrawingInfo.DrawingInfo.LabelingInfo.Add(lablingInfo);
|
|
|
|
|
}
|
|
|
|
|
return advancedDrawingInfo.ToJson();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000224 RID: 548 RVA: 0x0000AE38 File Offset: 0x00009038
|
|
|
|
|
public CIMSymbolReference GetCIMSymbolReference(FSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
CIMSymbolReference cimsymbolReference = new CIMSymbolReference
|
|
|
|
|
{
|
|
|
|
|
SymbolName = "Symbol_1"
|
|
|
|
|
};
|
|
|
|
|
CIMPolygonSymbol cimpolygonSymbol = new CIMPolygonSymbol();
|
|
|
|
|
cimsymbolReference.Symbol = cimpolygonSymbol;
|
|
|
|
|
List<SymbolLayer> cimfill = this.GetCIMFill(symbol);
|
|
|
|
|
if (cimfill != null && cimfill.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
cimpolygonSymbol.SymbolLayers.AddRange(cimfill);
|
|
|
|
|
}
|
|
|
|
|
return cimsymbolReference;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000225 RID: 549 RVA: 0x0000AE9C File Offset: 0x0000909C
|
|
|
|
|
private CIMFilledStroke GetCIMFilledStrokeL(LSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
CIMFilledStroke cimfilledStroke = new CIMFilledStroke();
|
|
|
|
|
CIMSolidPattern cimsolidPattern = new CIMSolidPattern();
|
|
|
|
|
cimfilledStroke.ColorLocked = true;
|
|
|
|
|
if (symbol is CLSymbol)
|
|
|
|
|
{
|
|
|
|
|
CLSymbol clsymbol = new CLSymbol();
|
|
|
|
|
cimfilledStroke.CapStyle = clsymbol.Cap.ToString().Replace("esriLCS", "");
|
|
|
|
|
cimfilledStroke.JoinStyle = clsymbol.Join.ToString().Replace("esriLJS", "");
|
|
|
|
|
cimfilledStroke.MiterLimit = (int)clsymbol.MiterLimit;
|
|
|
|
|
}
|
|
|
|
|
if (symbol == null)
|
|
|
|
|
{
|
|
|
|
|
cimsolidPattern.Color[0] = 110;
|
|
|
|
|
cimsolidPattern.Color[1] = 110;
|
|
|
|
|
cimsolidPattern.Color[2] = 110;
|
|
|
|
|
cimsolidPattern.Color[3] = 255;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
cimsolidPattern.Color = symbol.Color;
|
|
|
|
|
cimfilledStroke.Width = symbol.Width;
|
|
|
|
|
}
|
|
|
|
|
cimfilledStroke.Pattern = cimsolidPattern;
|
|
|
|
|
return cimfilledStroke;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000226 RID: 550 RVA: 0x0000AF98 File Offset: 0x00009198
|
|
|
|
|
private CIMFilledStroke GetCIMFilledStrokeCL(CLSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
CIMFilledStroke cimfilledStroke = new CIMFilledStroke();
|
|
|
|
|
cimfilledStroke.ColorLocked = true;
|
|
|
|
|
cimfilledStroke.CapStyle = symbol.Cap.ToString().Replace("esriLCS", "");
|
|
|
|
|
cimfilledStroke.JoinStyle = symbol.Join.ToString().Replace("esriLJS", "");
|
|
|
|
|
cimfilledStroke.MiterLimit = (int)symbol.MiterLimit;
|
|
|
|
|
CIMSolidPattern cimsolidPattern = new CIMSolidPattern();
|
|
|
|
|
if (symbol == null)
|
|
|
|
|
{
|
|
|
|
|
cimsolidPattern.Color[0] = 110;
|
|
|
|
|
cimsolidPattern.Color[1] = 110;
|
|
|
|
|
cimsolidPattern.Color[2] = 110;
|
|
|
|
|
cimsolidPattern.Color[3] = 255;
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
cimsolidPattern.Color = symbol.Color;
|
|
|
|
|
cimfilledStroke.Width = symbol.Width;
|
|
|
|
|
}
|
|
|
|
|
cimfilledStroke.Pattern = cimsolidPattern;
|
|
|
|
|
return cimfilledStroke;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000227 RID: 551 RVA: 0x0000B078 File Offset: 0x00009278
|
|
|
|
|
private CIMFilledStroke GetCIMFilledStroke(int[] color)
|
|
|
|
|
{
|
|
|
|
|
return new CIMFilledStroke
|
|
|
|
|
{
|
|
|
|
|
Pattern = new CIMSolidPattern
|
|
|
|
|
{
|
|
|
|
|
Color = color
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000228 RID: 552 RVA: 0x0000B0A8 File Offset: 0x000092A8
|
|
|
|
|
private List<SymbolLayer> GetCIMFill(FSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
List<SymbolLayer> list = new List<SymbolLayer>();
|
|
|
|
|
if (symbol is MultiLayerFillSymbol)
|
|
|
|
|
{
|
|
|
|
|
MultiLayerFillSymbol multiLayerFillSymbol = symbol as MultiLayerFillSymbol;
|
|
|
|
|
for (int i = 0; i < multiLayerFillSymbol.LayerCount; i++)
|
|
|
|
|
{
|
|
|
|
|
List<SymbolLayer> cimfill = this.GetCIMFill(multiLayerFillSymbol.GetLayer(i));
|
|
|
|
|
if (cimfill != null && cimfill.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
list.AddRange(cimfill);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (symbol is SFSymbol)
|
|
|
|
|
{
|
|
|
|
|
list.Add(this.GetCIMFilledStrokeL(symbol.Outline));
|
|
|
|
|
list.Add(this.GetCIMFillSFSymbol(symbol as SFSymbol));
|
|
|
|
|
}
|
|
|
|
|
else if (symbol is LineFSymbol)
|
|
|
|
|
{
|
|
|
|
|
list.Add(this.GetCIMFilledStrokeL(symbol.Outline));
|
|
|
|
|
list.Add(this.GetCIMFillLineFSymbol(symbol as LineFSymbol));
|
|
|
|
|
}
|
|
|
|
|
else if (symbol is PFSymbol)
|
|
|
|
|
{
|
|
|
|
|
list.Add(this.GetCIMFilledStrokeL(symbol.Outline));
|
|
|
|
|
list.Add(this.GetCIMFillPicFSymbol(symbol as PFSymbol));
|
|
|
|
|
list.Add(this.GetCIMPFillSFSymbol());
|
|
|
|
|
}
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000229 RID: 553 RVA: 0x0000B1EC File Offset: 0x000093EC
|
|
|
|
|
private CIMFill GetCIMFillSFSymbol(SFSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
CIMFill cimfill = new CIMFill();
|
|
|
|
|
CIMSolidPattern cimsolidPattern = new CIMSolidPattern();
|
|
|
|
|
cimsolidPattern.Color = symbol.Color;
|
|
|
|
|
cimfill.ColorLocked = false;
|
|
|
|
|
cimfill.Pattern = cimsolidPattern;
|
|
|
|
|
return cimfill;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x0600022A RID: 554 RVA: 0x0000B228 File Offset: 0x00009428
|
|
|
|
|
private CIMFill GetCIMPFillSFSymbol()
|
|
|
|
|
{
|
|
|
|
|
CIMFill cimfill = new CIMFill();
|
|
|
|
|
CIMSolidPattern cimsolidPattern = new CIMSolidPattern();
|
|
|
|
|
cimsolidPattern.Color = new int[4];
|
|
|
|
|
cimfill.ColorLocked = false;
|
|
|
|
|
cimfill.Pattern = cimsolidPattern;
|
|
|
|
|
return cimfill;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x0600022B RID: 555 RVA: 0x0000B264 File Offset: 0x00009464
|
|
|
|
|
private CIMFill GetCIMFillLineFSymbol(LineFSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
return new CIMFill
|
|
|
|
|
{
|
|
|
|
|
Pattern = new CIMHatchPattern
|
|
|
|
|
{
|
|
|
|
|
LineSymbol = this.GetCIMLineSymbol(symbol.LineSymbol),
|
|
|
|
|
Separation = symbol.Separation,
|
|
|
|
|
Rotation = symbol.Angle
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x0600022C RID: 556 RVA: 0x0000B2B8 File Offset: 0x000094B8
|
|
|
|
|
private CIMFill GetCIMFillPicFSymbol(PFSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
return new CIMFill
|
|
|
|
|
{
|
|
|
|
|
Pattern = new CIMTiledPattern
|
|
|
|
|
{
|
|
|
|
|
Height = symbol.Height,
|
|
|
|
|
Url = "data:" + symbol.ContentType + ";base64," + symbol.ImageData,
|
|
|
|
|
ColorSubstitutions =
|
|
|
|
|
{
|
|
|
|
|
new CIMColorSubstitution
|
|
|
|
|
{
|
|
|
|
|
NewColor = symbol.Outline.Color
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x0600022D RID: 557 RVA: 0x0000B334 File Offset: 0x00009534
|
|
|
|
|
public string GetLineAdvanced(LSymbol symbol, LabelingInfo lablingInfo)
|
|
|
|
|
{
|
|
|
|
|
AdvancedDrawingInfo advancedDrawingInfo = new AdvancedDrawingInfo();
|
|
|
|
|
SimpleRenderer simpleRenderer = new SimpleRenderer();
|
|
|
|
|
advancedDrawingInfo.DrawingInfo.Renderer = simpleRenderer;
|
|
|
|
|
simpleRenderer.Symbol = this.GetCIMSymbolReference(symbol);
|
|
|
|
|
if (lablingInfo != null)
|
|
|
|
|
{
|
|
|
|
|
advancedDrawingInfo.DrawingInfo.LabelingInfo = new List<LabelingInfo>();
|
|
|
|
|
advancedDrawingInfo.DrawingInfo.LabelingInfo.Add(lablingInfo);
|
|
|
|
|
}
|
|
|
|
|
return advancedDrawingInfo.ToJson();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x0600022E RID: 558 RVA: 0x0000B3A0 File Offset: 0x000095A0
|
|
|
|
|
public CIMSymbolReference GetCIMSymbolReference(LSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
CIMSymbolReference cimsymbolReference = new CIMSymbolReference
|
|
|
|
|
{
|
|
|
|
|
SymbolName = "Symbol_1"
|
|
|
|
|
};
|
|
|
|
|
CIMLineSymbol cimlineSymbol = new CIMLineSymbol();
|
|
|
|
|
cimsymbolReference.Symbol = cimlineSymbol;
|
|
|
|
|
List<SymbolLayer> lineSymbolLayers = this.GetLineSymbolLayers(symbol);
|
|
|
|
|
if (lineSymbolLayers != null && lineSymbolLayers.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
cimlineSymbol.SymbolLayers.AddRange(lineSymbolLayers);
|
|
|
|
|
}
|
|
|
|
|
return cimsymbolReference;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x0600022F RID: 559 RVA: 0x0000B404 File Offset: 0x00009604
|
|
|
|
|
private CIMLineSymbol GetCIMLineSymbol(LSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
CIMLineSymbol cimlineSymbol = new CIMLineSymbol();
|
|
|
|
|
cimlineSymbol.SymbolLayers.AddRange(this.GetLineSymbolLayers(symbol));
|
|
|
|
|
return cimlineSymbol;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000230 RID: 560 RVA: 0x0000B430 File Offset: 0x00009630
|
|
|
|
|
private List<SymbolLayer> GetLineSymbolLayers(LSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
List<SymbolLayer> list = new List<SymbolLayer>();
|
|
|
|
|
if (symbol is SLSymbol)
|
|
|
|
|
{
|
|
|
|
|
list.Add(this.GetCIMFilledStroke(symbol));
|
|
|
|
|
}
|
|
|
|
|
else if (symbol is CLSymbol)
|
|
|
|
|
{
|
|
|
|
|
list.Add(this.GetCIMFilledStrokeCL(symbol as CLSymbol));
|
|
|
|
|
}
|
|
|
|
|
else if (symbol is MultiLayerLineSymbol)
|
|
|
|
|
{
|
|
|
|
|
MultiLayerLineSymbol multiLayerLineSymbol = symbol as MultiLayerLineSymbol;
|
|
|
|
|
for (int i = 0; i < multiLayerLineSymbol.LayerCount; i++)
|
|
|
|
|
{
|
|
|
|
|
List<SymbolLayer> lineSymbolLayers = this.GetLineSymbolLayers(multiLayerLineSymbol.GetLayer(i));
|
|
|
|
|
if (lineSymbolLayers != null && lineSymbolLayers.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
list.AddRange(lineSymbolLayers);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (symbol is HashLSymbol)
|
|
|
|
|
{
|
|
|
|
|
list.Add(this.GetCIMPlacedPointSymbolsHashLine(symbol as HashLSymbol));
|
|
|
|
|
}
|
|
|
|
|
else if (!(symbol is PictureLSymbol))
|
|
|
|
|
{
|
|
|
|
|
if (symbol is MarkLSymbol)
|
|
|
|
|
{
|
|
|
|
|
list.Add(this.GetCIMPlacedPointSymbolsMarkerLine(symbol as MarkLSymbol));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000231 RID: 561 RVA: 0x0000B568 File Offset: 0x00009768
|
|
|
|
|
private CIMFilledStroke GetCIMFilledStroke(LSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
return this.GetCIMFilledStrokeL(symbol);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000232 RID: 562 RVA: 0x0000B584 File Offset: 0x00009784
|
|
|
|
|
private CIMPlacedPointSymbolsHashLine GetCIMPlacedPointSymbolsHashLine(HashLSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
CIMPlacedPointSymbolsHashLine cimplacedPointSymbolsHashLine = new CIMPlacedPointSymbolsHashLine();
|
|
|
|
|
CIMPointSymbol cimpointSymbol = new CIMPointSymbol();
|
|
|
|
|
CIMVectorMarker cimvectorMarker = new CIMVectorMarker();
|
|
|
|
|
MarkerGraphicsClass markerGraphicsClass = new MarkerGraphicsClass();
|
|
|
|
|
markerGraphicsClass.Symbol = new CIMLineSymbol
|
|
|
|
|
{
|
|
|
|
|
SymbolLayers =
|
|
|
|
|
{
|
|
|
|
|
this.GetCIMFilledStroke(symbol.Color)
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
GeometryClass geometry = new GeometryClass();
|
|
|
|
|
markerGraphicsClass.Geometry = geometry;
|
|
|
|
|
FrameClass frame = new FrameClass();
|
|
|
|
|
cimvectorMarker.Frame = frame;
|
|
|
|
|
cimvectorMarker.MarkerGraphics = markerGraphicsClass;
|
|
|
|
|
cimpointSymbol.SymbolLayers.Add(cimvectorMarker);
|
|
|
|
|
cimplacedPointSymbolsHashLine.PointSymbols = cimpointSymbol;
|
|
|
|
|
cimplacedPointSymbolsHashLine.PointSymbolPlacementEffect = new CIMPointSymbolPlacementAlongLineSameSize();
|
|
|
|
|
return cimplacedPointSymbolsHashLine;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000233 RID: 563 RVA: 0x0000B624 File Offset: 0x00009824
|
|
|
|
|
private CIMPlacedPointSymbolsMarkerLine GetCIMPlacedPointSymbolsMarkerLine(MarkLSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
CIMPlacedPointSymbolsMarkerLine cimplacedPointSymbolsMarkerLine = new CIMPlacedPointSymbolsMarkerLine();
|
|
|
|
|
CIMPointSymbol cimpointSymbol = new CIMPointSymbol();
|
|
|
|
|
CIMSimpleMarker cimsimpleMarker = new CIMSimpleMarker();
|
|
|
|
|
cimsimpleMarker.Size = symbol.MarkerSymbol.Size;
|
|
|
|
|
cimsimpleMarker.FillColor = symbol.Color;
|
|
|
|
|
CIMLineSymbol cimlineSymbol = new CIMLineSymbol();
|
|
|
|
|
cimlineSymbol.SymbolLayers.Add(this.GetCIMFilledStroke(symbol.Color));
|
|
|
|
|
cimpointSymbol.SymbolLayers.Add(cimsimpleMarker);
|
|
|
|
|
cimplacedPointSymbolsMarkerLine.PointSymbols = cimpointSymbol;
|
|
|
|
|
cimplacedPointSymbolsMarkerLine.PointSymbolPlacementEffect = new CIMPointSymbolPlacementAlongLineSameSize();
|
|
|
|
|
return cimplacedPointSymbolsMarkerLine;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000234 RID: 564 RVA: 0x0000B6AC File Offset: 0x000098AC
|
|
|
|
|
private CIMFilledStroke GetCIMFilledStrokeL(PictureLSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
CIMFilledStroke cimfilledStroke = new CIMFilledStroke();
|
|
|
|
|
CIMTiledPattern cimtiledPattern = new CIMTiledPattern();
|
|
|
|
|
cimfilledStroke.ColorLocked = true;
|
|
|
|
|
if (symbol != null)
|
|
|
|
|
{
|
|
|
|
|
PictureLSymbol pictureLSymbol = new PictureLSymbol();
|
|
|
|
|
}
|
|
|
|
|
cimtiledPattern.ScaleX = (int)symbol.XScale;
|
|
|
|
|
cimtiledPattern.Height = symbol.Width;
|
|
|
|
|
cimfilledStroke.Width = symbol.Width;
|
|
|
|
|
cimfilledStroke.Pattern = cimtiledPattern;
|
|
|
|
|
return cimfilledStroke;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000235 RID: 565 RVA: 0x0000B718 File Offset: 0x00009918
|
|
|
|
|
public string GetMarkerAdvanced(MSymbol symbol, LabelingInfo lablingInfo)
|
|
|
|
|
{
|
|
|
|
|
AdvancedDrawingInfo advancedDrawingInfo = new AdvancedDrawingInfo();
|
|
|
|
|
SimpleRenderer simpleRenderer = new SimpleRenderer();
|
|
|
|
|
advancedDrawingInfo.DrawingInfo.Renderer = simpleRenderer;
|
|
|
|
|
simpleRenderer.Symbol = this.GetCIMSymbolReference(symbol);
|
|
|
|
|
if (lablingInfo != null)
|
|
|
|
|
{
|
|
|
|
|
advancedDrawingInfo.DrawingInfo.LabelingInfo = new List<LabelingInfo>();
|
|
|
|
|
advancedDrawingInfo.DrawingInfo.LabelingInfo.Add(lablingInfo);
|
|
|
|
|
}
|
|
|
|
|
return advancedDrawingInfo.ToJson();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000236 RID: 566 RVA: 0x0000B784 File Offset: 0x00009984
|
|
|
|
|
public CIMSymbolReference GetCIMSymbolReference(MSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
CIMSymbolReference cimsymbolReference = new CIMSymbolReference
|
|
|
|
|
{
|
|
|
|
|
SymbolName = "Symbol_1"
|
|
|
|
|
};
|
|
|
|
|
CIMPointSymbol cimpointSymbol = new CIMPointSymbol();
|
|
|
|
|
cimsymbolReference.Symbol = cimpointSymbol;
|
|
|
|
|
List<SymbolLayer> cimpoint = this.GetCIMPoint(symbol);
|
|
|
|
|
if (cimpoint != null && cimpoint.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
cimpointSymbol.SymbolLayers.AddRange(cimpoint);
|
|
|
|
|
}
|
|
|
|
|
cimpointSymbol.AnchorPoint = new AnchorPointClass();
|
|
|
|
|
cimpointSymbol.AnchorPointUnits = "Points";
|
|
|
|
|
cimpointSymbol.HaloColor = new int[4];
|
|
|
|
|
cimpointSymbol.ScaleX = 1;
|
|
|
|
|
return cimsymbolReference;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000237 RID: 567 RVA: 0x0000B818 File Offset: 0x00009A18
|
|
|
|
|
private List<SymbolLayer> GetCIMPoint(MSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
List<SymbolLayer> list = new List<SymbolLayer>();
|
|
|
|
|
if (symbol is MultiLayerMarkerSymbol)
|
|
|
|
|
{
|
|
|
|
|
MultiLayerMarkerSymbol multiLayerMarkerSymbol = symbol as MultiLayerMarkerSymbol;
|
|
|
|
|
for (int i = 0; i < multiLayerMarkerSymbol.LayerCount; i++)
|
|
|
|
|
{
|
|
|
|
|
List<SymbolLayer> cimpoint = this.GetCIMPoint(multiLayerMarkerSymbol.GetLayer(i));
|
|
|
|
|
if (cimpoint != null && cimpoint.Count > 0)
|
|
|
|
|
{
|
|
|
|
|
list.AddRange(cimpoint);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
else if (symbol is SMarkerSymbol)
|
|
|
|
|
{
|
|
|
|
|
list.Add(this.GetCIMSimpleMarker(symbol as SMarkerSymbol));
|
|
|
|
|
}
|
|
|
|
|
else if (symbol is PMarkSymbol)
|
|
|
|
|
{
|
|
|
|
|
list.Add(this.GetPictureMarker(symbol as PMarkSymbol));
|
|
|
|
|
}
|
|
|
|
|
else if (symbol is AMarkSymbol)
|
|
|
|
|
{
|
|
|
|
|
list.Add(this.GetVectorMarker(symbol));
|
|
|
|
|
}
|
|
|
|
|
else if (symbol is CMarkerSymbol)
|
|
|
|
|
{
|
|
|
|
|
list.Add(this.GetVectorMarker(symbol));
|
|
|
|
|
}
|
|
|
|
|
return list;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000238 RID: 568 RVA: 0x0000B934 File Offset: 0x00009B34
|
|
|
|
|
private CIMSimpleMarker GetCIMSimpleMarker(SMarkerSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
CIMSimpleMarker cimsimpleMarker = new CIMSimpleMarker();
|
|
|
|
|
cimsimpleMarker.AnchorPoint = new AnchorPointClass();
|
|
|
|
|
cimsimpleMarker.AnchorPointUnits = "Points";
|
|
|
|
|
cimsimpleMarker.Size = symbol.Size;
|
|
|
|
|
cimsimpleMarker.DominantSizeAxis3D = "Z";
|
|
|
|
|
cimsimpleMarker.Enable = true;
|
|
|
|
|
cimsimpleMarker.FillColor = symbol.Color;
|
|
|
|
|
if (symbol.outline != null)
|
|
|
|
|
{
|
|
|
|
|
cimsimpleMarker.OutlineWidth = (double)symbol.outline.Width;
|
|
|
|
|
cimsimpleMarker.OutlineColor = symbol.outline.Color;
|
|
|
|
|
}
|
|
|
|
|
return cimsimpleMarker;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x06000239 RID: 569 RVA: 0x0000B9C8 File Offset: 0x00009BC8
|
|
|
|
|
private CIMVectorMarker GetVectorMarker(MSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
CIMVectorMarker cimvectorMarker = new CIMVectorMarker();
|
|
|
|
|
if (symbol is AMarkSymbol)
|
|
|
|
|
{
|
|
|
|
|
cimvectorMarker.AnchorPointUnits = "Relative";
|
|
|
|
|
cimvectorMarker.ColorLocked = true;
|
|
|
|
|
cimvectorMarker.DominantSizeAxis3D = "Z";
|
|
|
|
|
cimvectorMarker.Enable = true;
|
|
|
|
|
cimvectorMarker.Size = (symbol as AMarkSymbol).Size;
|
|
|
|
|
}
|
|
|
|
|
else if (symbol is CMarkerSymbol)
|
|
|
|
|
{
|
|
|
|
|
cimvectorMarker.AnchorPointUnits = "Relative";
|
|
|
|
|
cimvectorMarker.ColorLocked = true;
|
|
|
|
|
cimvectorMarker.DominantSizeAxis3D = "Z";
|
|
|
|
|
cimvectorMarker.Enable = true;
|
|
|
|
|
cimvectorMarker.Size = (symbol as CMarkerSymbol).Size;
|
|
|
|
|
}
|
|
|
|
|
return cimvectorMarker;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Token: 0x0600023A RID: 570 RVA: 0x0000BA7C File Offset: 0x00009C7C
|
|
|
|
|
private CIMPictureMarker GetPictureMarker(PMarkSymbol symbol)
|
|
|
|
|
{
|
|
|
|
|
return new CIMPictureMarker
|
|
|
|
|
{
|
|
|
|
|
Size = symbol.Size,
|
|
|
|
|
Url = "data:image/png;base64," + symbol.ImageData
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|