/// <summary> /// Returns the dashes information. /// </summary> internal unsafe void GetDashData(MIL_PEN_DATA *pData, out double[] dashArray) { DoubleCollection vDashes = Dashes; int count = 0; if (vDashes != null) { count = vDashes.Count; } unsafe { pData->DashArraySize = (UInt32)count * sizeof(double); pData->DashOffset = Offset; } if (count > 0) { dashArray = vDashes._collection.ToArray(); } else { dashArray = null; } }
internal unsafe static extern int MilUtility_PathGeometryHitTest( MilMatrix3x2D *pMatrix, MIL_PEN_DATA *pPenData, double *pDashArray, FillRule fillRule, byte *pPathData, UInt32 nSize, double rTolerance, bool fRelative, Point *pHitPoint, out bool pDoesContain);
internal unsafe static extern int MilUtility_PolygonHitTest( MilMatrix3x2D *pGeometryMatrix, MIL_PEN_DATA *pPenData, double *pDashArray, Point *pPoints, byte *pTypes, UInt32 cPoints, UInt32 cSegments, double rTolerance, bool fRelative, Point *pHitPoint, out bool pDoesContain);
internal unsafe static extern int MilUtility_PolygonBounds( MilMatrix3x2D *pWorldMatrix, MIL_PEN_DATA *pPenData, double *pDashArray, Point *pPoints, byte *pTypes, UInt32 pointCount, UInt32 segmentCount, MilMatrix3x2D *pGeometryMatrix, double rTolerance, bool fRelative, bool fSkipHollows, Rect *pBounds);
internal unsafe void GetBasicPenData(MIL_PEN_DATA *pData, out double[] dashArray) { dashArray = null; Invariant.Assert(pData != null); unsafe { pData->Thickness = Thickness; pData->StartLineCap = GetInternalCapType(StartLineCap); pData->EndLineCap = GetInternalCapType(EndLineCap); pData->DashCap = GetInternalCapType(DashCap); pData->LineJoin = GetInternalJoinType(LineJoin); pData->MiterLimit = MiterLimit; } if (DashStyle != null) { DashStyle.GetDashData(pData, out dashArray); } }