コード例 #1
0
ファイル: Gdi.cs プロジェクト: mirror222/ZeroSystem
        internal _LineInfo DrawRopLines(IntPtr pen, Point[] points)
        {
            int    iROP    = SetROP(BinaryRasterOperations.R2_XORPEN);
            IntPtr cOldPen = SelectPen(pen);

            int iLength = points.Length;

            for (int i = 1; i < iLength; i++)
            {
                Point cStart = points[i - 1];
                Point cEnd   = points[i];

                MoveToEx(__cHDC, cStart.X, cStart.Y, IntPtr.Zero);
                LineTo(__cHDC, cEnd.X, cEnd.Y);
            }

            SelectPen(cOldPen);
            SetROP(iROP);

            _LineInfo cLineInfo = new _LineInfo(pen, points);

            if (__bSaveRop)
            {
                __cLineInfos.Add(cLineInfo);
            }
            return(cLineInfo);
        }
コード例 #2
0
ファイル: Gdi.cs プロジェクト: mirror222/ZeroSystem
        private void ClearRopLines(_LineInfo lineInfo)
        {
            int    iROP    = SetROP(BinaryRasterOperations.R2_XORPEN);
            IntPtr cOldPen = SelectPen(lineInfo.Pen);

            Point[] cPoints = lineInfo.Points;
            int     iLength = cPoints.Length;

            for (int i = 1; i < iLength; i++)
            {
                Point cStart = cPoints[i - 1];
                Point cEnd   = cPoints[i];

                MoveToEx(__cHDC, cStart.X, cStart.Y, IntPtr.Zero);
                LineTo(__cHDC, cEnd.X, cEnd.Y);
            }

            SelectPen(cOldPen);
            SetROP(iROP);
        }