public D2D1RectF GetBounds(D2D1Matrix3X2F worldTransform) { D2D1RectF bounds; GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned); try { this.GetHandle<ID2D1Geometry>().GetBounds(worldTransformHandle.AddrOfPinnedObject(), out bounds); } finally { worldTransformHandle.Free(); } return bounds; }
public void ComputePointAtLength(float length, D2D1Matrix3X2F worldTransform, float flatteningTolerance, out D2D1Point2F point, out D2D1Point2F unitTangentVector) { GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned); try { this.GetHandle<ID2D1Geometry>().ComputePointAtLength(length, worldTransformHandle.AddrOfPinnedObject(), flatteningTolerance, out point, out unitTangentVector); } finally { worldTransformHandle.Free(); } }
public float ComputeLength(D2D1Matrix3X2F worldTransform) { float length; GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned); try { this.GetHandle<ID2D1Geometry>().ComputeLength(worldTransformHandle.AddrOfPinnedObject(), D2D1Constants.DefaultFlatteningTolerance, out length); } finally { worldTransformHandle.Free(); } return length; }
public D2D1RectF GetWidenedBounds(float strokeWidth, D2D1StrokeStyle strokeStyle, D2D1Matrix3X2F worldTransform, float flatteningTolerance) { D2D1RectF bounds; GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned); try { this.GetHandle<ID2D1Geometry>().GetWidenedBounds(strokeWidth, strokeStyle == null ? null : strokeStyle.GetHandle<ID2D1StrokeStyle>(), worldTransformHandle.AddrOfPinnedObject(), flatteningTolerance, out bounds); } finally { worldTransformHandle.Free(); } return bounds; }
public float ComputeArea(D2D1Matrix3X2F worldTransform, float flatteningTolerance) { float area; GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned); try { this.GetHandle<ID2D1Geometry>().ComputeArea(worldTransformHandle.AddrOfPinnedObject(), flatteningTolerance, out area); } finally { worldTransformHandle.Free(); } return area; }
public void Outline(D2D1Matrix3X2F worldTransform, D2D1SimplifiedGeometrySink geometrySink) { if (geometrySink == null) { throw new ArgumentNullException("geometrySink"); } GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned); try { this.GetHandle<ID2D1Geometry>().Outline(worldTransformHandle.AddrOfPinnedObject(), D2D1Constants.DefaultFlatteningTolerance, geometrySink.GetHandle<ID2D1SimplifiedGeometrySink>()); } finally { worldTransformHandle.Free(); } }
public void CombineWithGeometry(D2D1Geometry inputGeometry, D2D1CombineMode combineMode, D2D1Matrix3X2F inputGeometryTransform, D2D1SimplifiedGeometrySink geometrySink) { if (inputGeometry == null) { throw new ArgumentNullException("inputGeometry"); } if (geometrySink == null) { throw new ArgumentNullException("geometrySink"); } GCHandle inputGeometryTransformHandle = GCHandle.Alloc(inputGeometryTransform, GCHandleType.Pinned); try { this.GetHandle<ID2D1Geometry>().CombineWithGeometry(inputGeometry.GetHandle<ID2D1Geometry>(), combineMode, inputGeometryTransformHandle.AddrOfPinnedObject(), D2D1Constants.DefaultFlatteningTolerance, geometrySink.GetHandle<ID2D1SimplifiedGeometrySink>()); } finally { inputGeometryTransformHandle.Free(); } }
public void Tessellate(D2D1Matrix3X2F worldTransform, D2D1TessellationSink tessellationSink) { if (tessellationSink == null) { throw new ArgumentNullException("tessellationSink"); } GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned); try { this.GetHandle<ID2D1Geometry>().Tessellate(worldTransformHandle.AddrOfPinnedObject(), D2D1Constants.DefaultFlatteningTolerance, (ID2D1TessellationSink)tessellationSink.Handle); } finally { worldTransformHandle.Free(); } }
public void Simplify(D2D1GeometrySimplificationOption simplificationOption, D2D1Matrix3X2F worldTransform, float flatteningTolerance, D2D1SimplifiedGeometrySink geometrySink) { if (geometrySink == null) { throw new ArgumentNullException("geometrySink"); } GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned); try { this.GetHandle<ID2D1Geometry>().Simplify(simplificationOption, worldTransformHandle.AddrOfPinnedObject(), flatteningTolerance, geometrySink.GetHandle<ID2D1SimplifiedGeometrySink>()); } finally { worldTransformHandle.Free(); } }
public D2D1GeometryRelation CompareWithGeometry(D2D1Geometry inputGeometry, D2D1Matrix3X2F inputGeometryTransform) { if (inputGeometry == null) { throw new ArgumentNullException("inputGeometry"); } D2D1GeometryRelation relation; GCHandle inputGeometryTransformHandle = GCHandle.Alloc(inputGeometryTransform, GCHandleType.Pinned); try { this.GetHandle<ID2D1Geometry>().CompareWithGeometry(inputGeometry.GetHandle<ID2D1Geometry>(), inputGeometryTransformHandle.AddrOfPinnedObject(), D2D1Constants.DefaultFlatteningTolerance, out relation); } finally { inputGeometryTransformHandle.Free(); } return relation; }
public bool FillContainPoint(D2D1Point2F point, D2D1Matrix3X2F worldTransform) { bool contains; GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned); try { this.GetHandle<ID2D1Geometry>().FillContainsPoint(point, worldTransformHandle.AddrOfPinnedObject(), D2D1Constants.DefaultFlatteningTolerance, out contains); } finally { worldTransformHandle.Free(); } return contains; }
public bool StrokeContainsPoint(D2D1Point2F point, float strokeWidth, D2D1StrokeStyle strokeStyle, D2D1Matrix3X2F worldTransform) { bool contains; GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned); try { this.GetHandle<ID2D1Geometry>().StrokeContainsPoint(point, strokeWidth, strokeStyle == null ? null : strokeStyle.GetHandle<ID2D1StrokeStyle>(), worldTransformHandle.AddrOfPinnedObject(), D2D1Constants.DefaultFlatteningTolerance, out contains); } finally { worldTransformHandle.Free(); } return contains; }
public void Widen(float strokeWidth, D2D1StrokeStyle strokeStyle, D2D1Matrix3X2F worldTransform, D2D1SimplifiedGeometrySink geometrySink) { if (geometrySink == null) { throw new ArgumentNullException("geometrySink"); } GCHandle worldTransformHandle = GCHandle.Alloc(worldTransform, GCHandleType.Pinned); try { this.GetHandle<ID2D1Geometry>().Widen(strokeWidth, strokeStyle == null ? null : strokeStyle.GetHandle<ID2D1StrokeStyle>(), worldTransformHandle.AddrOfPinnedObject(), D2D1Constants.DefaultFlatteningTolerance, geometrySink.GetHandle<ID2D1SimplifiedGeometrySink>()); } finally { worldTransformHandle.Free(); } }
public D2D1TransformedGeometry CreateTransformedGeometry(D2D1Geometry sourceGeometry, D2D1Matrix3X2F transform) { if (sourceGeometry == null) { throw new ArgumentNullException("sourceGeometry"); } ID2D1TransformedGeometry transformedGeometry; this.factory.CreateTransformedGeometry(sourceGeometry.GetHandle<ID2D1Geometry>(), ref transform, out transformedGeometry); return new D2D1TransformedGeometry(transformedGeometry); }