public GiSaveClipBox(GiGraphics gs, Box2d rectWorld) : this(touchvgPINVOKE.new_GiSaveClipBox(GiGraphics.getCPtr(gs), Box2d.getCPtr(rectWorld)), true) { if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } }
/// <summary> /// Computes the extents of the path, if the path had been transformed with /// the given transform. /// </summary> /// <param name="t"></param> /// <returns></returns> public Box2d GetTransformedExtents(Transform2d t) { Box2d res = new Box2d(); double penx = 0.0, peny = 0.0; double x, y; foreach (GFXPathMoveTo node in PathPoints) { if (node is GFXPathLineTo) { t.Apply(node.X, node.Y, out x, out y, true); res.Append(x, y); t.Apply(penx, peny, out x, out y, true); res.Append(x, y); } else if (node is GFXPathArcTo) { res.Append(GeomUtil.GetTransformedArcExtents(penx, peny, node.X, node.Y, ((GFXPathArcTo)node).Bulge, t)); } else if (node is GFXPathBezierTo) { GFXPathBezierTo bn = (GFXPathBezierTo)node; res.Append(GeomUtil.GetTransformedBezierExtents(penx, peny, bn.XC1, bn.YC1, bn.XC2, bn.YC2, bn.X, bn.Y, t)); } penx = node.X; peny = node.Y; } return(res); }
public Box2d(Box2d src, bool normal) : this(touchvgPINVOKE.new_Box2d__SWIG_1(Box2d.getCPtr(src), normal), true) { if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } }
/// <summary> /// Constructs the inventor curve and adds reference to the source sheet. /// </summary> /// <param name="curve"></param> /// <param name="sheet"></param> public InventorDrawingCurve(DrawingCurve curve, Sheet sheet) { _curve = curve; _sheet = sheet; _rangeBox = _curve.Evaluator2D.RangeBox; CurveType = (CurveTypes)_curve.CurveType; }
public void setExtent(Box2d rect) { touchvgPINVOKE.MgBaseShape_setExtent(swigCPtr, Box2d.getCPtr(rect)); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } }
public void setPageRectW(Box2d rectW, float viewScale) { touchvgPINVOKE.MgShapeDoc_setPageRectW__SWIG_1(swigCPtr, Box2d.getCPtr(rectW), viewScale); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } }
static public Box2d Box(double sx, double sy, double ex, double ey) { Box2d b = tg.CreateBox2d(); b.MinPoint = CP2d(sx, sy); b.MaxPoint = CP2d(ex, ey); return(b); }
public static void beziersBox(Box2d box, int count, Point2d points) { touchvgPINVOKE.mgnear_beziersBox__SWIG_1(Box2d.getCPtr(box), count, Point2d.getCPtr(points)); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } }
public static void moveRectHandle(Box2d rect, int index, Point2d pt) { touchvgPINVOKE.mgnear_moveRectHandle__SWIG_1(Box2d.getCPtr(rect), index, Point2d.getCPtr(pt)); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } }
public static void cubicSplinesBox(Box2d box, int n, Point2d knots, Vector2d knotvs) { touchvgPINVOKE.mgnear_cubicSplinesBox__SWIG_2(Box2d.getCPtr(box), n, Point2d.getCPtr(knots), Vector2d.getCPtr(knotvs)); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } }
public virtual void getBoundingBox(Box2d box, MgMotion sender) { touchvgPINVOKE.MgCmdManager_getBoundingBox(swigCPtr, Box2d.getCPtr(box), MgMotion.getCPtr(sender)); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } }
public static void roundRectToBeziers(Point2d points, Box2d rect, float rx, float ry) { touchvgPINVOKE.mgcurv_roundRectToBeziers(Point2d.getCPtr(points), Box2d.getCPtr(rect), rx, ry); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } }
public static double Width(this Box2d box2d) { if (box2d == null) { throw new ArgumentNullException(nameof(box2d)); } return(box2d.MaxPoint.X - box2d.MinPoint.X); }
public static Box2d bezierBox4(Point2d p1, Point2d p2, Point2d p3, Point2d p4) { Box2d ret = new Box2d(touchvgPINVOKE.mgnear_bezierBox4(Point2d.getCPtr(p1), Point2d.getCPtr(p2), Point2d.getCPtr(p3), Point2d.getCPtr(p4)), true); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static bool cubicSplinesIntersectBox(Box2d box, int n, Point2d knots, Vector2d knotvs) { bool ret = touchvgPINVOKE.mgnear_cubicSplinesIntersectBox__SWIG_2(Box2d.getCPtr(box), n, Point2d.getCPtr(knots), Vector2d.getCPtr(knotvs)); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool zoomTo(Box2d rectWorld) { bool ret = touchvgPINVOKE.GiTransform_zoomTo__SWIG_2(swigCPtr, Box2d.getCPtr(rectWorld)); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public Box2d offset(Box2d box) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_offset__SWIG_2(swigCPtr, Box2d.getCPtr(box)), true); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public Box2d setWorldLimits(Box2d rect) { Box2d ret = new Box2d(touchvgPINVOKE.GiTransform_setWorldLimits(swigCPtr, Box2d.getCPtr(rect)), true); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public Box2d intersectWith(Box2d box) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_intersectWith__SWIG_1(swigCPtr, Box2d.getCPtr(box)), false); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static bool clipLine(Point2d pt1, Point2d pt2, Box2d box) { bool ret = touchvgPINVOKE.mglnrel_clipLine(Point2d.getCPtr(pt1), Point2d.getCPtr(pt2), Box2d.getCPtr(box)); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public Box2d unionWith(Box2d r1, Box2d r2) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_unionWith__SWIG_0(swigCPtr, Box2d.getCPtr(r1), Box2d.getCPtr(r2)), false); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool isEqualTo(Box2d box) { bool ret = touchvgPINVOKE.Box2d_isEqualTo__SWIG_1(swigCPtr, Box2d.getCPtr(box)); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public static bool beziersIntersectBox(Box2d box, int count, Point2d points, bool closed) { bool ret = touchvgPINVOKE.mgnear_beziersIntersectBox__SWIG_0(Box2d.getCPtr(box), count, Point2d.getCPtr(points), closed); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool zoomTo(Box2d rectWorld, RECT_2D rcTo, bool adjust) { bool ret = touchvgPINVOKE.GiTransform_zoomTo__SWIG_0(swigCPtr, Box2d.getCPtr(rectWorld), RECT_2D.getCPtr(rcTo), adjust); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public Box2d unionWith(Point2d pt) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_unionWith__SWIG_3(swigCPtr, Point2d.getCPtr(pt)), false); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool drawRoundRect(GiContext ctx, Box2d rect, float rx) { bool ret = touchvgPINVOKE.GiGraphics_drawRoundRect__SWIG_2(swigCPtr, GiContext.getCPtr(ctx), Box2d.getCPtr(rect), rx); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool crossWithPath(MgPath path, Box2d box, Point2d ptCross) { bool ret = touchvgPINVOKE.MgPath_crossWithPath(swigCPtr, MgPath.getCPtr(path), Box2d.getCPtr(box), Point2d.getCPtr(ptCross)); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public override bool hitTestBox(Box2d rect) { bool ret = touchvgPINVOKE.MgDiamond_hitTestBox(swigCPtr, Box2d.getCPtr(rect)); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool drawEllipse(GiContext ctx, Box2d rect) { bool ret = touchvgPINVOKE.GiGraphics_drawEllipse__SWIG_3(swigCPtr, GiContext.getCPtr(ctx), Box2d.getCPtr(rect)); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public bool setClipWorld(Box2d rectWorld) { bool ret = touchvgPINVOKE.GiGraphics_setClipWorld(swigCPtr, Box2d.getCPtr(rectWorld)); if (touchvgPINVOKE.SWIGPendingException.Pending) { throw touchvgPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
public void AccessorsAreCorrect() { Box2d box = new Box2d(0, 1, -2, 3, -4, 5, 6); Assert.AreEqual(0, box.X); Assert.AreEqual(1, box.Y); Assert.AreEqual(-2, box.Amin); Assert.AreEqual(3, box.Amax); Assert.AreEqual(-4, box.Bmin); Assert.AreEqual(5, box.Bmax); Assert.AreEqual(6, box.Rotation); }
public void GetBox2d() { double speed = 1; // 1 m / ms double deltaMS = 10; double explength = speed * deltaMS; Box2d expected = new Box2d(10 + explength, 20, 0, explength, -0.01, 0.01, 0); Shot shot = new Shot(Calc.v(10, 20), 0, speed, 0); shot.Tick(deltaMS); Box2d result = shot.GetBox2d(); Assert.AreEqual(expected, result); }
public Box2d unionWith(Point2d pt) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_unionWith__SWIG_3(swigCPtr, Point2d.getCPtr(pt)), false); if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public Box2d unionWith(Box2d box) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_unionWith__SWIG_1(swigCPtr, Box2d.getCPtr(box)), false); if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public Box2d unionWith(float x, float y) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_unionWith__SWIG_2(swigCPtr, x, y), false); return ret; }
public Box2d inflate(float d) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_inflate__SWIG_0(swigCPtr, d), false); return ret; }
public Box2d swapTopBottom() { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_swapTopBottom(swigCPtr), false); return ret; }
public bool isIntersect(Box2d box) { bool ret = touchvgPINVOKE.Box2d_isIntersect(swigCPtr, Box2d.getCPtr(box)); if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public Box2d inflate(float x, float y) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_inflate__SWIG_1(swigCPtr, x, y), false); return ret; }
public Box2d getPageRectW() { Box2d ret = new Box2d(touchvgPINVOKE.MgShapeDoc_getPageRectW(swigCPtr), false); return ret; }
public Box2d inflate(float l, float b, float r, float t) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_inflate__SWIG_4(swigCPtr, l, b, r, t), false); return ret; }
public Box2d offset(Box2d box) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_offset__SWIG_2(swigCPtr, Box2d.getCPtr(box)), true); if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public Box2d(Box2d src) : this(touchvgPINVOKE.new_Box2d__SWIG_2(Box2d.getCPtr(src)), true) { if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); }
public Box2d offset(Vector2d vec) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_offset__SWIG_1(swigCPtr, Vector2d.getCPtr(vec)), false); if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public Box2d offset(float x, float y) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_offset__SWIG_0(swigCPtr, x, y), false); return ret; }
public Box2d normalize() { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_normalize(swigCPtr), false); return ret; }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Box2d obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; }
public bool contains(Box2d box, Tol tol) { bool ret = touchvgPINVOKE.Box2d_contains__SWIG_3(swigCPtr, Box2d.getCPtr(box), Tol.getCPtr(tol)); if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public Box2d scaleBy(float sx) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_scaleBy__SWIG_1(swigCPtr, sx), false); return ret; }
public bool isEqualTo(Box2d box, Tol tol) { bool ret = touchvgPINVOKE.Box2d_isEqualTo__SWIG_0(swigCPtr, Box2d.getCPtr(box), Tol.getCPtr(tol)); if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public Box2d getExtent() { Box2d ret = new Box2d(touchvgPINVOKE.MgShapeDoc_getExtent(swigCPtr), true); return ret; }
public Box2d set(Box2d src) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_set__SWIG_1(swigCPtr, Box2d.getCPtr(src)), false); if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public void setPageRectW(Box2d rectW, float viewScale) { touchvgPINVOKE.MgShapeDoc_setPageRectW__SWIG_1(swigCPtr, Box2d.getCPtr(rectW), viewScale); if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); }
public Box2d set(float x1, float y1, float x2, float y2) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_set__SWIG_3(swigCPtr, x1, y1, x2, y2), false); return ret; }
public Box2d deflate(Box2d box) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_deflate__SWIG_3(swigCPtr, Box2d.getCPtr(box)), false); if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public Box2d set(Point2d p1, Point2d p2, Point2d p3, Point2d p4) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_set__SWIG_4(swigCPtr, Point2d.getCPtr(p1), Point2d.getCPtr(p2), Point2d.getCPtr(p3), Point2d.getCPtr(p4)), false); if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public Box2d set(int count, Point2d points) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_set__SWIG_5(swigCPtr, count, Point2d.getCPtr(points)), false); return ret; }
public Box2d set(Point2d center, float width, float height) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_set__SWIG_6(swigCPtr, Point2d.getCPtr(center), width, height), false); if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public Box2d intersectWith(Box2d r1, Box2d r2) { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_intersectWith__SWIG_0(swigCPtr, Box2d.getCPtr(r1), Box2d.getCPtr(r2)), false); if (touchvgPINVOKE.SWIGPendingException.Pending) throw touchvgPINVOKE.SWIGPendingException.Retrieve(); return ret; }
public Box2d empty() { Box2d ret = new Box2d(touchvgPINVOKE.Box2d_empty(swigCPtr), false); return ret; }