예제 #1
0
        private void SetDimensionProperties(MapDimensionProperties newMapDimProps)
        {
            //Grid map cell number has changed
            if (!newMapDimProps.HasEqualDimensionProperties(DimensionProperties))
            {
                SetMapGridSize(newMapDimProps.Dimensions);
            }

            //Grid map transformation/cell size has changed
            if (!newMapDimProps.HasEqualTransformationProperties(DimensionProperties))
            {
                SetMapTransformation(newMapDimProps.TopLeftOffset, newMapDimProps.CellLength);
            }
        }
예제 #2
0
 /// <summary>
 /// Has equal transformation properties ?
 /// </summary>
 /// <param name="other">Other dimensions</param>
 /// <returns>true if equal properties</returns>
 public bool HasEqualTransformationProperties(MapDimensionProperties other)
 {
     return((TopLeftOffset == other.TopLeftOffset) && (CellLength == other.CellLength));
 }
예제 #3
0
 /// <summary>
 /// Has equal dimension ?
 /// </summary>
 /// <param name="other">Other dimensions</param>
 /// <returns>true if equal dimensions</returns>
 public bool HasEqualDimensionProperties(MapDimensionProperties other)
 {
     return(Dimensions == other.Dimensions);
 }