Example #1
0
        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_PathGeometryWiden( 
     MIL_PEN_DATA *pPenData,
     double *pDashArray,
     MilMatrix3x2D* pMatrix,
     FillRule fillRule, 
     byte* pPathData,
     UInt32 nSize, 
     double rTolerance, 
     bool fRelative,
     Delegate addFigureCallback, 
     out FillRule widenedFillRule);
 internal unsafe static extern int MilUtility_PathGeometryBounds( 
     MIL_PEN_DATA *pPenData, 
     double *pDashArray,
     MilMatrix3x2D* pWorldMatrix, 
     FillRule fillRule,
     byte* pPathData,
     UInt32 nSize,
     MilMatrix3x2D* pGeometryMatrix, 
     double rTolerance,
     bool fRelative, 
     bool fSkipHollows, 
     MilRectD* pBounds);
 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);
Example #7
0
        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);
            }
        }