public virtual void SetScaleBarPosition(ScaleBarPosition scaleBarPosition) { if (this.scaleBarPosition != scaleBarPosition) { this.scaleBarPosition = scaleBarPosition; this.redrawNeeded = true; } }
public MapScaleBar(MapViewPosition mapViewPosition, MapViewDimension mapViewDimension, DisplayModel displayModel, IGraphicFactory graphicFactory, int width, int height) { this.mapViewPosition = mapViewPosition; this.mapViewDimension = mapViewDimension; this.displayModel = displayModel; this.graphicFactory = graphicFactory; this.mapScaleBitmap = graphicFactory.CreateBitmap((int)(width * this.displayModel.ScaleFactor), (int)(height * this.displayModel.ScaleFactor)); this.marginHorizontal = DEFAULT_HORIZONTAL_MARGIN; this.marginVertical = DEFAULT_VERTICAL_MARGIN; this.scaleBarPosition = DEFAULT_SCALE_BAR_POSITION; this.mapScaleCanvas = graphicFactory.CreateCanvas(); this.mapScaleCanvas.Bitmap = this.mapScaleBitmap; this.distanceUnitAdapter = MetricUnitAdapter.INSTANCE; this.visible = true; this.redrawNeeded = true; }