예제 #1
0
파일: GRect.cs 프로젝트: m-kosina/GEDKeeper
 public GRect(GPoint location, GSize size)
 {
     fX      = location.X;
     fY      = location.Y;
     fWidth  = size.Width;
     fHeight = size.Height;
 }
예제 #2
0
        /// <summary>
        /// gets matrix size in tiles
        /// </summary>
        /// <param name="zoom"></param>
        /// <returns></returns>
        public virtual GSize GetTileMatrixSizeXY(int zoom)
        {
            GSize sMin = GetTileMatrixMinXY(zoom);
            GSize sMax = GetTileMatrixMaxXY(zoom);

            return(new GSize(sMax.Width - sMin.Width + 1, sMax.Height - sMin.Height + 1));
        }
예제 #3
0
        public override bool Equals(object obj)
        {
            if (!(obj is GSize))
            {
                return(false);
            }

            GSize comp = (GSize)obj;

            // Note value types can't have derived classes, so we don't need to
            //
            return((comp.fWidth == fWidth) && (comp.fHeight == fHeight));
        }
예제 #4
0
        /// <summary>
        /// gets matrix size in pixels
        /// </summary>
        /// <param name="zoom"></param>
        /// <returns></returns>
        public virtual GSize GetTileMatrixSizePixel(int zoom)
        {
            GSize s = GetTileMatrixSizeXY(zoom);

            return(new GSize(s.Width * TileSize.Width, s.Height * TileSize.Height));
        }
예제 #5
0
        /// <summary>
        /// tile matrix size in pixels at custom zoom level
        /// </summary>
        /// <param name="zoom"></param>
        /// <returns></returns>
        public long GetTileMatrixItemCount(int zoom)
        {
            GSize s = GetTileMatrixSizeXY(zoom);

            return(s.Width * s.Height);
        }