Exemplo n.º 1
0
        public static bool DefaultContains(CairoPoint point, int width, int height)
        {
            ArrayPoint storagePoint = ArrayPointFromGridPoint(point.BasePoint);

            return
                (storagePoint.X >= 0 &&
                 storagePoint.X < width &&
                 storagePoint.Y >= 0 &&
                 storagePoint.Y < height);
        }
Exemplo n.º 2
0
 public InspectableSplicedVectorPoint(CairoPoint point)
 {
     x     = point.X;
     y     = point.Y;
     index = point.I;
 }
Exemplo n.º 3
0
 /**
  *      Construct a new grid whose cells are determined by the given test function.
  *
  *      The function should only return true for points within the bounds of the rectangle when
  *      the given transforms are applied to them.
  *
  *      Normally, the static factory methods or shape building methods should be used to create grids.
  *      These constructors are provided for advanced usage.
  *
  *      @link_constructing_grids
  */
 public CairoGrid(int width, int height, Func <CairoPoint, bool> isInside, CairoPoint offset) :
     this(width, height, isInside, x => x.MoveBy(offset), x => x.MoveBackBy(offset), CairoPoint.MainDirections)
 {
 }