コード例 #1
0
        protected override void DoPaint(HCStyle aStyle, RECT aDrawRect, int aDataDrawTop,
                                        int aDataDrawBottom, int aDataScreenTop, int aDataScreenBottom, HCCanvas aCanvas, PaintInfo aPaintInfo)
        {
            if (aPaintInfo.Print)
            {
                SIZE vSize = new SIZE();
                GDI.SetViewportExtEx(aCanvas.Handle, aPaintInfo.WindowWidth, aPaintInfo.WindowHeight, ref vSize);
                try
                {
                    aCanvas.StretchDraw(aDrawRect, FImage);
                }
                finally
                {
                    GDI.SetViewportExtEx(aCanvas.Handle, aPaintInfo.GetScaleX(aPaintInfo.WindowWidth),
                                         aPaintInfo.GetScaleY(aPaintInfo.WindowHeight), ref vSize);
                }
            }
            else
            {
                aCanvas.StretchDraw(aDrawRect, FImage);
            }

            FShapeManager.PaintTo(aCanvas, aDrawRect, aPaintInfo);

            base.DoPaint(aStyle, aDrawRect, aDataDrawTop, aDataDrawBottom, aDataScreenBottom, aDataScreenBottom,
                         aCanvas, aPaintInfo);
        }
コード例 #2
0
ファイル: HCImageItem.cs プロジェクト: ganjiayi/HCView-CSharp
        protected override void DoPaint(HCStyle aStyle, RECT aDrawRect, int aDataDrawTop,
                                        int aDataDrawBottom, int aDataScreenTop, int aDataScreenBottom, HCCanvas aCanvas, PaintInfo aPaintInfo)
        {
            if (aPaintInfo.Print)
            {
                if (FEmpty)
                {
                    return;
                }

                aCanvas.StretchPrintDrawBitmap(aDrawRect, FImage);
            }
            else
            {
                aCanvas.StretchDraw(aDrawRect, FImage);
            }

            if (FEmpty)
            {
                aCanvas.Pen.Color = Color.Black;
                aCanvas.Pen.Width = 1;
                aCanvas.Rectangle(aDrawRect);
            }

            FShapeManager.PaintTo(aCanvas, aDrawRect, aPaintInfo);

            base.DoPaint(aStyle, aDrawRect, aDataDrawTop, aDataDrawBottom, aDataScreenBottom, aDataScreenBottom,
                         aCanvas, aPaintInfo);
        }
コード例 #3
0
ファイル: HCImageItem.cs プロジェクト: qq32qq/HCView-CSharp
        protected override void DoPaint(HCStyle aStyle, RECT aDrawRect, int aDataDrawTop,
                                        int aDataDrawBottom, int aDataScreenTop, int aDataScreenBottom, HCCanvas aCanvas, PaintInfo aPaintInfo)
        {
            if (aPaintInfo.Print)
            {
                aCanvas.StretchPrintDrawBitmap(aDrawRect, FImage);
            }
            else
            {
                aCanvas.StretchDraw(aDrawRect, FImage);
            }

            FShapeManager.PaintTo(aCanvas, aDrawRect, aPaintInfo);

            base.DoPaint(aStyle, aDrawRect, aDataDrawTop, aDataDrawBottom, aDataScreenBottom, aDataScreenBottom,
                         aCanvas, aPaintInfo);
        }