Exemplo n.º 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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        //
        protected override void DoPaint(HCStyle AStyle, RECT ADrawRect, int ADataDrawTop,
                                        int ADataDrawBottom, int ADataScreenTop, int ADataScreenBottom, HCCanvas ACanvas, PaintInfo APaintInfo)
        {
            ACanvas.StretchDraw(ADrawRect, FImage);

            base.DoPaint(AStyle, ADrawRect, ADataDrawTop, ADataDrawBottom, ADataScreenBottom, ADataScreenBottom,
                         ACanvas, APaintInfo);
        }
Exemplo n.º 4
0
        protected override void DoPaint(HCStyle aStyle, RECT aDrawRect, int aDataDrawTop,
                                        int aDataDrawBottom, int aDataScreenTop, int aDataScreenBottom, HCCanvas aCanvas, PaintInfo aPaintInfo)
        {
            aCanvas.StretchDraw(aDrawRect, FImage);

            base.DoPaint(aStyle, aDrawRect, aDataDrawTop, aDataDrawBottom, aDataScreenBottom, aDataScreenBottom,
                         aCanvas, aPaintInfo);
        }
Exemplo n.º 5
0
        protected override void DoPaint(HCStyle aStyle, RECT aDrawRect, int aDataDrawTop, int aDataDrawBottom, int aDataScreenTop, int aDataScreenBottom, HCCanvas aCanvas, PaintInfo aPaintInfo)
        {
            FDrawRect = aDrawRect;
            //if (FAnimate)
            //    UpdateImage();  // 获得当前gif动画下一步要渲染的帧

            //aCanvas.Draw(aDrawRect.Left, aDrawRect.Top, FGifImage);
            aCanvas.StretchDraw(aDrawRect, FGifImage);
            base.DoPaint(aStyle, aDrawRect, aDataDrawTop, aDataDrawBottom, aDataScreenTop, aDataScreenBottom, aCanvas, aPaintInfo);
        }
Exemplo n.º 6
0
 protected override void DoPaint(HCStyle aStyle, RECT aDrawRect, int aDataDrawTop, int aDataDrawBottom,
                                 int aDataScreenTop, int aDataScreenBottom, HCCanvas aCanvas, PaintInfo aPaintInfo)
 {
     using (Image vBitmap = SharpZXingBarCode.Create(FText, 3, Width, Height))
     {
         if (vBitmap != null)
         {
             aCanvas.StretchDraw(aDrawRect, vBitmap);
         }
     }
     // 绘制一维码
     base.DoPaint(aStyle, aDrawRect, aDataDrawTop, aDataDrawBottom, aDataScreenTop, aDataScreenBottom,
                  aCanvas, aPaintInfo);
 }
Exemplo n.º 7
0
        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);
        }
Exemplo n.º 8
0
 protected override void DoPaint(HCStyle aStyle, RECT aDrawRect, int aDataDrawTop, int aDataDrawBottom,
                                 int aDataScreenTop, int aDataScreenBottom, HCCanvas aCanvas, PaintInfo aPaintInfo)
 {
     using (Image vImage = SharpZXingQRCode.Create(FText, Width, Height))
     {
         if (vImage != null)
         {
             if (aPaintInfo.Print)
             {
                 aCanvas.StretchPrintDrawImage(aDrawRect, vImage);
             }
             else
             {
                 aCanvas.StretchDraw(aDrawRect, vImage);
             }
         }
     }
     // 绘制二维码
     base.DoPaint(aStyle, aDrawRect, aDataDrawTop, aDataDrawBottom, aDataScreenTop, aDataScreenBottom,
                  aCanvas, aPaintInfo);
 }