protected virtual void RenderPointTemplate(MapPointTemplate mapPointTemplate, Symbol coreSymbol, bool customTemplate, bool ignoreBackgroundColor, bool ignoreSize, bool ignoreMarker, bool hasScope) { if (mapPointTemplate == null) { base.RenderStyle(null, null, coreSymbol, ignoreBackgroundColor, hasScope); coreSymbol.BorderStyle = base.GetBorderStyle(null, null, hasScope); } else { base.RenderSpatialElementTemplate(mapPointTemplate, coreSymbol, ignoreBackgroundColor, hasScope); Style style = mapPointTemplate.Style; StyleInstance style2 = mapPointTemplate.Instance.Style; coreSymbol.BorderStyle = base.GetBorderStyle(style, style2, hasScope); if (!ignoreSize) { int size = this.GetSize(mapPointTemplate, hasScope); float num3 = coreSymbol.Width = (coreSymbol.Height = (float)size); } ReportEnumProperty <MapPointLabelPlacement> labelPlacement = mapPointTemplate.LabelPlacement; TextAlignment textAlignment = TextAlignment.Bottom; if (labelPlacement != null) { if (!labelPlacement.IsExpression) { textAlignment = this.GetTextAlignment(labelPlacement.Value); } else if (hasScope) { textAlignment = this.GetTextAlignment(mapPointTemplate.Instance.LabelPlacement); } } coreSymbol.TextAlignment = textAlignment; } }
public void RenderPolygonCenterPoint(MapPolygon mapPolygon, Symbol coreSymbol, bool hasScope) { bool flag = PointTemplateMapper.PolygonUseCustomTemplate(mapPolygon, hasScope); MapPointTemplate mapPointTemplate = (!flag) ? this.m_vectorLayerMapper.GetMapPointTemplate() : mapPolygon.MapCenterPointTemplate; this.RenderPointTemplate(mapPointTemplate, coreSymbol, flag, !flag && this.m_vectorLayerMapper.HasPointColorRule(coreSymbol) && hasScope, !flag && this.m_vectorLayerMapper.HasPointSizeRule(coreSymbol) && hasScope, !flag && this.m_vectorLayerMapper.HasMarkerRule(coreSymbol) && hasScope, hasScope); }
public void Render(MapPoint mapPoint, Symbol coreSymbol, bool hasScope) { bool flag = PointTemplateMapper.UseCustomTemplate(mapPoint, hasScope); MapPointTemplate mapPointTemplate = (!flag) ? this.MapPointLayer.MapPointTemplate : mapPoint.MapPointTemplate; this.RenderPointTemplate(mapPointTemplate, coreSymbol, flag, !flag && this.m_vectorLayerMapper.HasPointColorRule(coreSymbol) && hasScope, !flag && this.m_vectorLayerMapper.HasPointSizeRule(coreSymbol) && hasScope, !flag && this.m_vectorLayerMapper.HasMarkerRule(coreSymbol) && hasScope, hasScope); }
private bool HasCenterPointTemplate(MapPolygon mapPolygon, MapPointTemplate pointTemplate, bool hasScope) { if (mapPolygon != null && PointTemplateMapper.PolygonUseCustomTemplate(mapPolygon, hasScope)) { return(mapPolygon.MapCenterPointTemplate != null); } return(pointTemplate != null); }
public int GetSize(MapPointTemplate mapPointTemplate, bool hasScope) { ReportSizeProperty size = mapPointTemplate.Size; if (size != null) { if (!size.IsExpression) { return(MappingHelper.ToIntPixels(size.Value, base.m_mapMapper.DpiX)); } if (hasScope) { return(MappingHelper.ToIntPixels(mapPointTemplate.Instance.Size, base.m_mapMapper.DpiX)); } return(PointTemplateMapper.GetDefaultSymbolSize(base.m_mapMapper.DpiX)); } return(PointTemplateMapper.GetDefaultSymbolSize(base.m_mapMapper.DpiX)); }
protected override void RenderPointTemplate(MapPointTemplate mapPointTemplate, Symbol coreSymbol, bool customTemplate, bool ignoreBackgoundColor, bool ignoreSize, bool ignoreMarker, bool hasScope) { base.RenderPointTemplate(mapPointTemplate, coreSymbol, customTemplate, ignoreBackgoundColor, ignoreSize, ignoreMarker, hasScope); if (!ignoreMarker) { MapMarker mapMarker = ((MapMarkerTemplate)mapPointTemplate).MapMarker; MapMarkerStyle markerStyle = MapMapper.GetMarkerStyle(mapMarker, hasScope); if (markerStyle != MapMarkerStyle.Image) { coreSymbol.MarkerStyle = MapMapper.GetMarkerStyle(markerStyle); } else { MapMarkerImage mapMarkerImage = mapMarker.MapMarkerImage; if (mapMarkerImage == null) { throw new RenderingObjectModelException(RPRes.rsMapLayerMissingProperty(RPRes.rsObjectTypeMap, base.m_mapVectorLayer.MapDef.Name, base.m_mapVectorLayer.Name, "MapMarkerImage")); } string image; if (this.CanShareMarkerImage(mapMarkerImage, customTemplate)) { if (this.sharedImageName == null) { this.sharedImageName = base.m_mapMapper.AddImage(mapMarkerImage); } image = this.sharedImageName; } else { image = base.m_mapMapper.AddImage(mapMarkerImage); } coreSymbol.Image = image; coreSymbol.ImageResizeMode = base.m_mapMapper.GetImageResizeMode(mapMarkerImage); coreSymbol.ImageTransColor = base.m_mapMapper.GetImageTransColor(mapMarkerImage); } } }
public MapPointTemplateInstance(MapPointTemplate defObject) : base(defObject) { this.m_defObject = defObject; }