コード例 #1
0
        private void CacheBounds(ref MilRectD bounds)
        {
            unsafe
            {
                Debug.Assert((_data != null) && (_data.Length >= sizeof(MIL_PATHGEOMETRY)));
                fixed (byte* pbPathData = _data)
                {
                    MIL_PATHGEOMETRY* pGeometry = (MIL_PATHGEOMETRY*)pbPathData;

                    pGeometry->Flags |= MilPathGeometryFlags.BoundsValid;
                    pGeometry->Bounds = bounds;
                }
            }
        }
コード例 #2
0
 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);
コード例 #3
0
        private bool AreBoundsValid(ref MilRectD bounds)
        {
            if (IsEmpty())
            {
                return false;
            }

            unsafe
            {
                Debug.Assert((_data != null) && (_data.Length >= sizeof(MIL_PATHGEOMETRY)));
                fixed (byte* pbPathData = _data)
                {
                    MIL_PATHGEOMETRY* pGeometry = (MIL_PATHGEOMETRY*)pbPathData;

                    bool areBoundsValid = (pGeometry->Flags & MilPathGeometryFlags.BoundsValid) != 0;

                    if (areBoundsValid)
                    {
                        bounds = pGeometry->Bounds;
                    }

                    return areBoundsValid;
                }
            }
        }