コード例 #1
0
        public unsafe ReadOnlySpan <POINTS> GetPointsForPoly(int index)
        {
            if (index < 0 || index >= nPolys)
            {
                throw new ArgumentOutOfRangeException(nameof(index));
            }

            int current = 0;

            fixed(void *s = &emr)
            {
                POINTS *currentPoint = (POINTS *)((byte *)s + sizeof(EMRPOLYPOLY16) + (sizeof(uint) * (nPolys - 1)));
                var     counts       = aPolyCounts;

                while (current != index)
                {
                    currentPoint += counts[current];
                    current++;
                }
                return(new ReadOnlySpan <POINTS>(currentPoint, (int)counts[current]));
            }
        }
コード例 #2
0
 public static extern int PSPropertyBag_WritePOINTS(IPropertyBag *propBag, [NativeTypeName("LPCWSTR")] ushort *propName, [NativeTypeName("const POINTS *")] POINTS *value);
コード例 #3
0
 public static extern int PSPropertyBag_ReadPOINTS(IPropertyBag *propBag, [NativeTypeName("LPCWSTR")] ushort *propName, POINTS *value);