public GRect(GPoint location, GSize size) { fX = location.X; fY = location.Y; fWidth = size.Width; fHeight = size.Height; }
/// <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)); }
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)); }
/// <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)); }
/// <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); }