示例#1
0
        public void SetSizeInPixels(SizeF size)
        {
            MapCore mapCore = GetMapCore();

            if (mapCore != null)
            {
                if (SizeUnit == CoordinateUnit.Pixel)
                {
                    Size = new MapSize(this, size.Width, size.Height);
                    return;
                }
                float num = 100f * size.Width / (float)mapCore.Width;
                num = ((!float.IsNaN(num) && !float.IsInfinity(num)) ? num : 0f);
                float num2 = 100f * size.Height / (float)mapCore.Height;
                num2 = ((!float.IsNaN(num2) && !float.IsInfinity(num2)) ? num2 : 0f);
                Size = new MapSize(this, num, num2);
            }
        }
示例#2
0
 internal void SizeChanged(MapSize size)
 {
     SizeLocationChanged(SizeLocationChangeInfo.Size);
 }
示例#3
0
 internal MapSize(MapSize size)
     : this(size.Parent, size.Width, size.Height)
 {
 }
示例#4
0
 public Position(MapLocation location, MapSize size, ContentAlignment locationAlignment)
 {
     this.location          = location;
     this.size              = size;
     this.locationAlignment = locationAlignment;
 }