Ejemplo n.º 1
0
        protected override void DoPaint(HCStyle AStyle, RECT ADrawRect,
                                        int ADataDrawTop, int ADataDrawBottom, int ADataScreenTop,
                                        int ADataScreenBottom, HCCanvas ACanvas, PaintInfo APaintInfo)
        {
            ACanvas.Pen.BeginUpdate();
            try
            {
                ACanvas.Pen.Color = Color.Black;
                ACanvas.Pen.Style = HCPenStyle.psSolid;
            }
            finally
            {
                ACanvas.Pen.EndUpdate();
            }

            ACanvas.MoveTo(FStartPt.X + this.DrawRect.Left, FStartPt.Y + this.DrawRect.Top);
            ACanvas.LineTo(FEndPt.X + this.DrawRect.Left, FEndPt.Y + this.DrawRect.Top);

            if ((this.Active) && (!APaintInfo.Print))  // 激活
            {
                ACanvas.Rectangle(FStartPt.X + this.DrawRect.Left - PointSize, FStartPt.Y + this.DrawRect.Top - PointSize,
                                  FStartPt.X + this.DrawRect.Left + PointSize, FStartPt.Y + this.DrawRect.Top + PointSize);
                ACanvas.Rectangle(FEndPt.X + this.DrawRect.Left - PointSize, FEndPt.Y + this.DrawRect.Top - PointSize,
                                  FEndPt.X + this.DrawRect.Left + PointSize, FEndPt.Y + this.DrawRect.Top + PointSize);
            }
        }
Ejemplo n.º 2
0
        protected override void DoPaint(HCStyle aStyle, RECT aDrawRect, int aDataDrawTop, int aDataDrawBottom,
                                        int aDataScreenTop, int aDataScreenBottom, HCCanvas aCanvas, PaintInfo aPaintInfo)
        {
            if (this.Active && (!aPaintInfo.Print))
            {
                aCanvas.Brush.Color = HC.clBtnFace;
                aCanvas.FillRect(aDrawRect);
            }

            if (!aPaintInfo.Print)
            {
                RECT vFocusRect = new RECT();
                if (FActiveArea != ExpressArea.ceaNone)
                {
                    if (FActiveArea == ExpressArea.ceaTop)
                    {
                        vFocusRect = FSupRect;
                    }
                    else
                    if (FActiveArea == ExpressArea.ceaBottom)
                    {
                        vFocusRect = FSubRect;
                    }

                    vFocusRect.Offset(aDrawRect.Left, aDrawRect.Top);
                    vFocusRect.Inflate(2, 2);
                    aCanvas.Pen.Color = Color.Blue;
                    aCanvas.Rectangle(vFocusRect);
                }

                if ((FMouseMoveArea != ExpressArea.ceaNone) && (FMouseMoveArea != FActiveArea))
                {
                    if (FMouseMoveArea == ExpressArea.ceaTop)
                    {
                        vFocusRect = FSupRect;
                    }
                    else
                    if (FMouseMoveArea == ExpressArea.ceaBottom)
                    {
                        vFocusRect = FSubRect;
                    }

                    vFocusRect.Offset(aDrawRect.Left, aDrawRect.Top);
                    vFocusRect.Inflate(2, 2);
                    aCanvas.Pen.Color = HC.clMedGray;
                    aCanvas.Rectangle(vFocusRect);
                }
            }

            ApplySupSubStyle(aStyle.TextStyles[TextStyleNo], aCanvas, aPaintInfo.ScaleY / aPaintInfo.Zoom);
            aCanvas.TextOut(aDrawRect.Left + FSupRect.Left, aDrawRect.Top + FSupRect.Top, FSupText);
            aCanvas.TextOut(aDrawRect.Left + FSubRect.Left, aDrawRect.Top + FSubRect.Top, FSubText);
        }
Ejemplo n.º 3
0
        public override void PaintTo(HCCanvas aCanvas, RECT aRect, PaintInfo aPaintInfo)
        {
            aCanvas.Pen.BeginUpdate();
            try
            {
                aCanvas.Pen.Color = Color;
                aCanvas.Pen.Width = Width;
                aCanvas.Pen.Style = LineStyle;
            }
            finally
            {
                aCanvas.Pen.EndUpdate();
            }

            if (FBackColor == HC.HCTransparentColor)
            {
                aCanvas.Brush.Style = HCBrushStyle.bsClear;
            }

            aCanvas.Rectangle(StartPt.X + aRect.Left, StartPt.Y + aRect.Top,
                              EndPt.X + aRect.Left, EndPt.Y + aRect.Top);

            if (!aPaintInfo.Print && this.Active)
            {
                PaintAnchor(aCanvas, aRect);
            }
        }
Ejemplo n.º 4
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);
        }
Ejemplo n.º 5
0
        protected override void DoPaint(HCStyle aStyle, RECT aDrawRect, int aDataDrawTop, int aDataDrawBottom,
                                        int aDataScreenTop, int aDataScreenBottom, HCCanvas aCanvas, PaintInfo aPaintInfo)
        {
            base.DoPaint(aStyle, aDrawRect, aDataDrawTop, aDataDrawBottom, aDataScreenTop, aDataScreenBottom,
                         aCanvas, aPaintInfo);

            if ((FMouseIn) && (!aPaintInfo.Print))
            {
                aCanvas.Brush.Color = HC.clBtnFace;
                aCanvas.FillRect(aDrawRect);
            }

            RECT vBoxRect = GetBoxRect();

            HC.OffsetRect(ref vBoxRect, aDrawRect.Left, aDrawRect.Top);

            if (this.IsSelectComplate && (!aPaintInfo.Print))
            {
                aCanvas.Brush.Color = aStyle.SelColor;
                aCanvas.FillRect(aDrawRect);
            }

            aCanvas.Brush.Style = HCBrushStyle.bsClear;

            aStyle.TextStyles[TextStyleNo].ApplyStyle(aCanvas, aPaintInfo.ScaleY / aPaintInfo.Zoom);
            aCanvas.TextOut(aDrawRect.Left + FMargin + CheckBoxSize + FMargin, aDrawRect.Top + (Height - aCanvas.TextHeight("H")) / 2, FText);

            if (FChecked)  // 勾选
            {
                User.DrawFrameControl(aCanvas.Handle, ref vBoxRect, Kernel.DFC_MENU, Kernel.DFCS_CHECKED | Kernel.DFCS_MENUCHECK);
            }

            aCanvas.Pen.Style = HCPenStyle.psSolid;
            if (FMouseIn && (!aPaintInfo.Print))  // 鼠标在其中,且非打印
            {
                aCanvas.Pen.Color = Color.Blue;
                aCanvas.Rectangle(vBoxRect.Left, vBoxRect.Top, vBoxRect.Right, vBoxRect.Bottom);
                HC.InflateRect(ref vBoxRect, 1, 1);
                aCanvas.Pen.Color = HC.clBtnFace;
                aCanvas.Rectangle(vBoxRect.Left, vBoxRect.Top, vBoxRect.Right, vBoxRect.Bottom);
            }
            else  // 鼠标不在其中或打印
            {
                aCanvas.Pen.Color = Color.Black;
                aCanvas.Rectangle(vBoxRect.Left, vBoxRect.Top, vBoxRect.Right, vBoxRect.Bottom);
            }
        }
Ejemplo n.º 6
0
        protected override void DoPaint(HCStyle AStyle, RECT ADrawRect, int ADataDrawTop, int ADataDrawBottom,
                                        int ADataScreenTop, int ADataScreenBottom, HCCanvas ACanvas, PaintInfo APaintInfo)
        {
            base.DoPaint(AStyle, ADrawRect, ADataDrawTop, ADataDrawBottom, ADataScreenTop, ADataScreenBottom,
                         ACanvas, APaintInfo);

            if ((FMouseIn) && (!APaintInfo.Print))
            {
                ACanvas.Brush.Color = HC.clBtnFace;
                ACanvas.FillRect(ADrawRect);
            }

            RECT vBoxRect = GetBoxRect();

            HC.OffsetRect(ref vBoxRect, ADrawRect.Left, ADrawRect.Top);

            if (this.IsSelectComplate && (!APaintInfo.Print))
            {
                ACanvas.Brush.Color = AStyle.SelColor;
                ACanvas.FillRect(ADrawRect);
            }

            AStyle.TextStyles[TextStyleNo].ApplyStyle(ACanvas, APaintInfo.ScaleY / APaintInfo.Zoom);
            ACanvas.TextOut(ADrawRect.Left + FMargin + CheckBoxSize + FMargin, ADrawRect.Top + (Height - ACanvas.TextHeight("H")) / 2, FText);

            if (FChecked)  // 勾选
            {
                User.DrawFrameControl(ACanvas.Handle, ref vBoxRect, Kernel.DFC_MENU, Kernel.DFCS_CHECKED | Kernel.DFCS_MENUCHECK);
            }

            if (FMouseIn && (!APaintInfo.Print))  // 鼠标在其中,且非打印
            {
                ACanvas.Pen.Color = Color.Blue;
                ACanvas.Rectangle(vBoxRect.Left, vBoxRect.Top, vBoxRect.Right, vBoxRect.Bottom);
                HC.InflateRect(ref vBoxRect, 1, 1);
                ACanvas.Pen.Color = HC.clBtnFace;
                ACanvas.Rectangle(vBoxRect.Left, vBoxRect.Top, vBoxRect.Right, vBoxRect.Bottom);
            }
            else  // 鼠标不在其中或打印
            {
                ACanvas.Pen.Color = Color.Black;
                ACanvas.Rectangle(vBoxRect.Left, vBoxRect.Top, vBoxRect.Right, vBoxRect.Bottom);
            }
        }
Ejemplo n.º 7
0
        protected override void PaintAnchor(HCCanvas aCanvas, RECT aRect)
        {
            aCanvas.Pen.BeginUpdate();
            try
            {
                aCanvas.Pen.Color   = Color.Black;
                aCanvas.Pen.Width   = 1;
                aCanvas.Pen.Style   = HCPenStyle.psSolid;
                aCanvas.Brush.Color = Color.White;
            }
            finally
            {
                aCanvas.Pen.EndUpdate();
            }

            aCanvas.Rectangle(FStartPt.X + aRect.Left - PointSize, FStartPt.Y + aRect.Top - PointSize,
                              FStartPt.X + aRect.Left + PointSize, FStartPt.Y + aRect.Top + PointSize);

            aCanvas.Rectangle(FEndPt.X + aRect.Left - PointSize, FEndPt.Y + aRect.Top - PointSize,
                              FEndPt.X + aRect.Left + PointSize, FEndPt.Y + aRect.Top + PointSize);
        }
Ejemplo n.º 8
0
        protected override void PaintAnchor(HCCanvas aCanvas, RECT aRect)
        {
            aCanvas.Pen.BeginUpdate();
            try
            {
                aCanvas.Pen.Color   = Color.Black;
                aCanvas.Pen.Width   = 1;
                aCanvas.Pen.Style   = HCPenStyle.psSolid;
                aCanvas.Brush.Color = Color.White;
            }
            finally
            {
                aCanvas.Pen.EndUpdate();
            }

            for (int i = 0; i < FPoints.Count; i++)
            {
                aCanvas.Rectangle(FPoints[i].X + aRect.Left - PointSize, FPoints[i].Y + aRect.Top - PointSize,
                                  FPoints[i].X + aRect.Left + PointSize, FPoints[i].Y + aRect.Top + PointSize);
            }

            if (FActivePointIndex >= 0)
            {
                aCanvas.Pen.Color = Color.Red;
                if (StructState == HCStructState.hstcStructing)
                {
                    aCanvas.Pen.Style = HCPenStyle.psDot;
                }

                aCanvas.Rectangle(
                    FPoints[FActivePointIndex].X + aRect.Left - PointSize,
                    FPoints[FActivePointIndex].Y + aRect.Top - PointSize,
                    FPoints[FActivePointIndex].X + aRect.Left + PointSize,
                    FPoints[FActivePointIndex].Y + aRect.Top + PointSize);
            }
        }
Ejemplo n.º 9
0
        public override void PaintTop(HCCanvas aCanvas)
        {
            base.PaintTop(aCanvas);
            if (FResizing)
            {
                aCanvas.Brush.Style = HCBrushStyle.bsClear;
                aCanvas.Rectangle(FResizeRect);
                aCanvas.Brush.Color = Color.White;
                aCanvas.Font.BeginUpdate();
                try
                {
                    aCanvas.Font.Color            = Color.Black;
                    aCanvas.Font.FontStyles.Value = 0;
                }
                finally
                {
                    aCanvas.Font.EndUpdate();
                }

                aCanvas.TextOut(FResizeRect.Left + 2, FResizeRect.Top + 2,
                                FResizeWidth.ToString() + " x " + FResizeHeight.ToString());
            }
        }
Ejemplo n.º 10
0
        protected override void DoPaint(HCStyle aStyle, RECT aDrawRect, int aDataDrawTop, int aDataDrawBottom,
                                        int aDataScreenTop, int aDataScreenBottom, HCCanvas aCanvas, PaintInfo aPaintInfo)
        {
            if (this.Active && (!aPaintInfo.Print))
            {
                aCanvas.Brush.Color = HC.clBtnFace;
                aCanvas.FillRect(aDrawRect);
            }

            if (!FLineHide)  // 分数线
            {
                aCanvas.Pen.Color = Color.Black;
                aCanvas.MoveTo(aDrawRect.Left + FPadding, aDrawRect.Top + FTopRect.Bottom + FPadding);
                aCanvas.LineTo(aDrawRect.Left + Width - FPadding, aDrawRect.Top + FTopRect.Bottom + FPadding);
            }

            if (!aPaintInfo.Print)
            {
                RECT vFocusRect = new RECT();

                if (FActiveArea != ExpressArea.ceaNone)
                {
                    if (FActiveArea == ExpressArea.ceaTop)
                    {
                        vFocusRect = FTopRect;
                    }
                    else
                    if (FActiveArea == ExpressArea.ceaBottom)
                    {
                        vFocusRect = FBottomRect;
                    }

                    vFocusRect.Offset(aDrawRect.Left, aDrawRect.Top);
                    vFocusRect.Inflate(2, 2);
                    aCanvas.Pen.Color = Color.Blue;
                    aCanvas.Rectangle(vFocusRect);
                }

                if ((FMouseMoveArea != ExpressArea.ceaNone) && (FMouseMoveArea != FActiveArea))
                {
                    if (FMouseMoveArea == ExpressArea.ceaTop)
                    {
                        vFocusRect = FTopRect;
                    }
                    else
                    if (FMouseMoveArea == ExpressArea.ceaBottom)
                    {
                        vFocusRect = FBottomRect;
                    }

                    vFocusRect.Offset(aDrawRect.Left, aDrawRect.Top);
                    vFocusRect.Inflate(2, 2);
                    aCanvas.Pen.Color = HC.clMedGray;
                    aCanvas.Rectangle(vFocusRect);
                }
            }

            aStyle.TextStyles[TextStyleNo].ApplyStyle(aCanvas, aPaintInfo.ScaleY / aPaintInfo.Zoom);
            aCanvas.TextOut(aDrawRect.Left + FTopRect.Left, aDrawRect.Top + FTopRect.Top, FTopText);
            aCanvas.TextOut(aDrawRect.Left + FBottomRect.Left, aDrawRect.Top + FBottomRect.Top, FBottomText);
        }
Ejemplo n.º 11
0
        public void PaintTo(HCCanvas canvas, RECT rect)
        {
            int            vX = 0, vHeight = this.Height, vW = 0;
            HCCodeLineType vLineType = HCCodeLineType.White;

            if (this.FTextVisible)
            {
                vHeight -= 12;
            }

            RECT vRect = new RECT();

            for (int i = 0, vLen = this.FCode.Length; i < vLen; i++)
            {
                vLineType = HCCodeLineType.White;
                this.OneBarProps(this.FCode[i], ref vW, ref vLineType);
                if (vLineType != HCCodeLineType.White)
                {
                    canvas.Brush.Color = Color.Black;
                }
                else
                {
                    canvas.Brush.Color = Color.White;
                }

                vRect.Left   = vX;
                vRect.Top    = 0;
                vRect.Right  = vX + vW * this.FZoom;
                vRect.Bottom = vHeight;
                vX           = vRect.Right;
                vRect.Offset(rect.Left, rect.Top);
                canvas.FillRect(vRect);
            }

            if (this.FCode == "")
            {
                canvas.Pen.BeginUpdate();
                try
                {
                    canvas.Pen.Width = 1;
                    canvas.Pen.Color = Color.Black;
                }
                finally
                {
                    canvas.Pen.EndUpdate();
                }

                canvas.Rectangle(rect);
            }

            if (this.FTextVisible)
            {
                canvas.Font.BeginUpdate();
                try
                {
                    canvas.Font.Size             = 8;
                    canvas.Font.FontStyles.Value = 0;
                    canvas.Font.Family           = "Arial";
                    canvas.Font.Color            = Color.Black;
                }
                finally
                {
                    canvas.Font.EndUpdate();
                }

                canvas.Brush.Style = HCBrushStyle.bsClear;
                if (this.FCode != "")
                {
                    canvas.TextOut(rect.Left + (rect.Width - canvas.TextWidth(this.FText)) / 2,
                                   rect.Top + vHeight + 2, this.FText);
                }
                else
                {
                    SIZE vSize = canvas.TextExtent("无效条码" + this.FText);
                    canvas.TextOut(rect.Left + (rect.Width - vSize.cx) / 2,
                                   rect.Top + (rect.Height - vSize.cy) / 2, "无效条码" + this.FText);
                }
            }
        }
Ejemplo n.º 12
0
 public override void PaintTop(HCCanvas aCanvas)
 {
     base.PaintTop(aCanvas);
     aCanvas.Brush.Style = HCBrushStyle.bsClear;
     aCanvas.Rectangle(FResizeRect);
 }
Ejemplo n.º 13
0
 public virtual void PaintTo(int aLeft, int aTop, HCCanvas aCanvas)
 {
     aCanvas.Pen.Color = Color.Blue;
     aCanvas.Rectangle(HC.Bounds(aLeft, aTop, FWidth, FHeight));
 }
Ejemplo n.º 14
0
        public void PaintToEx(HCCanvas ACanvas)
        {
            RECT vRect = new RECT();

            ACanvas.Brush.Color = TitleBackColor;
            ACanvas.FillRect(HC.Bounds(0, 0, Width, Height));

            if (FOrientation == Orientation.oriHorizontal)  // 水平滚动条
            {
                // 左按钮
                ACanvas.Pen.Color = Color.White;
                vRect.Left        = FLeftBtnRect.Left + ((FLeftBtnRect.Right - FLeftBtnRect.Left) - 4) / 2 + 4;
                vRect.Top         = FLeftBtnRect.Top + ((FLeftBtnRect.Bottom - FLeftBtnRect.Top) - 7) / 2;
                ACanvas.DrawLine(vRect.Left, vRect.Top, vRect.Left, vRect.Top + 7);
                ACanvas.DrawLine(vRect.Left - 1, vRect.Top + 1, vRect.Left - 1, vRect.Top + 6);
                ACanvas.DrawLine(vRect.Left - 2, vRect.Top + 2, vRect.Left - 2, vRect.Top + 5);
                ACanvas.DrawLine(vRect.Left - 3, vRect.Top + 3, vRect.Left - 3, vRect.Top + 4);
                // 右按钮
                vRect.Left = FRightBtnRect.Left + ((FRightBtnRect.Right - FRightBtnRect.Left) - 4) / 2;
                vRect.Top  = FRightBtnRect.Top + ((FRightBtnRect.Bottom - FRightBtnRect.Top) - 7) / 2;
                ACanvas.DrawLine(vRect.Left, vRect.Top, vRect.Left, vRect.Top + 7);
                ACanvas.DrawLine(vRect.Left + 1, vRect.Top + 1, vRect.Left + 1, vRect.Top + 6);
                ACanvas.DrawLine(vRect.Left + 2, vRect.Top + 2, vRect.Left + 2, vRect.Top + 5);
                ACanvas.DrawLine(vRect.Left + 3, vRect.Top + 3, vRect.Left + 3, vRect.Top + 4);
                // 水平滑块
                vRect = FThumRect;
                HC.InflateRect(ref vRect, 0, -1);
                DoDrawThumBefor(ACanvas, vRect);
                ACanvas.Brush.Color = ThumBackColor;
                ACanvas.Pen.Color   = LineColor;
                ACanvas.Rectangle(vRect);
                // 滑块上的修饰
                vRect.Left = vRect.Left + (vRect.Right - vRect.Left) / 2;
                ACanvas.DrawLine(vRect.Left, 5, vRect.Left, Height - 5);
                ACanvas.DrawLine(vRect.Left + 3, 5, vRect.Left + 3, Height - 5);
                ACanvas.DrawLine(vRect.Left - 3, 5, vRect.Left - 3, Height - 5);
            }
            else  // 垂直滚动条
            {
                // 上按钮
                ACanvas.Pen.Color = Color.White;
                vRect.Left        = FLeftBtnRect.Left + ((FLeftBtnRect.Right - FLeftBtnRect.Left) - 7) / 2;
                vRect.Top         = FLeftBtnRect.Top + ((FLeftBtnRect.Bottom - FLeftBtnRect.Top) - 4) / 2 + 4;

                ACanvas.DrawLine(6, 12, 13, 12);
                ACanvas.DrawLine(vRect.Left, vRect.Top, vRect.Left + 7, vRect.Top);
                ACanvas.DrawLine(vRect.Left + 1, vRect.Top - 1, vRect.Left + 6, vRect.Top - 1);
                ACanvas.DrawLine(vRect.Left + 2, vRect.Top - 2, vRect.Left + 5, vRect.Top - 2);
                ACanvas.DrawLine(vRect.Left + 3, vRect.Top - 3, vRect.Left + 4, vRect.Top - 3);
                // 下按钮
                vRect.Left = FRightBtnRect.Left + ((FRightBtnRect.Right - FRightBtnRect.Left) - 7) / 2;
                vRect.Top  = FRightBtnRect.Top + ((FRightBtnRect.Bottom - FRightBtnRect.Top) - 4) / 2;
                ACanvas.DrawLine(vRect.Left, vRect.Top, vRect.Left + 7, vRect.Top);
                ACanvas.DrawLine(vRect.Left + 1, vRect.Top + 1, vRect.Left + 6, vRect.Top + 1);
                ACanvas.DrawLine(vRect.Left + 2, vRect.Top + 2, vRect.Left + 5, vRect.Top + 2);
                ACanvas.DrawLine(vRect.Left + 3, vRect.Top + 3, vRect.Left + 4, vRect.Top + 3);
                // 滑块
                vRect = FThumRect;
                HC.InflateRect(ref vRect, -1, 0);
                DoDrawThumBefor(ACanvas, vRect);
                ACanvas.Brush.Color = ThumBackColor;
                ACanvas.Pen.Color   = LineColor;
                ACanvas.Rectangle(vRect);
                // 滑块上的修饰
                vRect.Top = vRect.Top + (vRect.Bottom - vRect.Top) / 2;
                ACanvas.DrawLine(5, vRect.Top, Width - 5, vRect.Top);
                ACanvas.DrawLine(5, vRect.Top - 3, Width - 5, vRect.Top - 3);
                ACanvas.DrawLine(5, vRect.Top + 3, Width - 5, vRect.Top + 3);
            }
        }
Ejemplo n.º 15
0
        protected override void DoPaint(HCStyle aStyle, RECT aDrawRect, int aDataDrawTop, int aDataDrawBottom,
                                        int aDataScreenTop, int aDataScreenBottom, HCCanvas aCanvas, PaintInfo aPaintInfo)
        {
            if (this.Active && (!aPaintInfo.Print))
            {
                aCanvas.Brush.Color = HC.clBtnFace;
                aCanvas.FillRect(aDrawRect);
            }

            aCanvas.Pen.Color = Color.Black;
            aCanvas.MoveTo(aDrawRect.Left + FLeftRect.Right + Padding, aDrawRect.Top + TopRect.Bottom + Padding);
            aCanvas.LineTo(aDrawRect.Left + FRightRect.Left - Padding, aDrawRect.Top + TopRect.Bottom + Padding);

            if (!aPaintInfo.Print)
            {
                RECT vFocusRect = new RECT();

                if (FActiveArea != ExpressArea.ceaNone)
                {
                    switch (FActiveArea)
                    {
                    case ExpressArea.ceaLeft:
                        vFocusRect = FLeftRect;
                        break;

                    case ExpressArea.ceaTop:
                        vFocusRect = TopRect;
                        break;

                    case ExpressArea.ceaRight:
                        vFocusRect = FRightRect;
                        break;

                    case ExpressArea.ceaBottom:
                        vFocusRect = BottomRect;
                        break;
                    }

                    vFocusRect.Offset(aDrawRect.Left, aDrawRect.Top);
                    vFocusRect.Inflate(2, 2);
                    aCanvas.Pen.Color = Color.Blue;
                    aCanvas.Rectangle(vFocusRect);
                }

                if ((FMouseMoveArea != ExpressArea.ceaNone) && (FMouseMoveArea != FActiveArea))
                {
                    switch (FMouseMoveArea)
                    {
                    case ExpressArea.ceaLeft:
                        vFocusRect = FLeftRect;
                        break;

                    case ExpressArea.ceaTop:
                        vFocusRect = TopRect;
                        break;

                    case ExpressArea.ceaRight:
                        vFocusRect = FRightRect;
                        break;

                    case ExpressArea.ceaBottom:
                        vFocusRect = BottomRect;
                        break;
                    }

                    vFocusRect.Offset(aDrawRect.Left, aDrawRect.Top);
                    vFocusRect.Inflate(2, 2);
                    aCanvas.Pen.Color = HC.clMedGray;
                    aCanvas.Rectangle(vFocusRect);
                }
            }

            aStyle.TextStyles[TextStyleNo].ApplyStyle(aCanvas, aPaintInfo.ScaleY / aPaintInfo.Zoom);
            aCanvas.TextOut(aDrawRect.Left + FLeftRect.Left, aDrawRect.Top + FLeftRect.Top, FLeftText);
            aCanvas.TextOut(aDrawRect.Left + TopRect.Left, aDrawRect.Top + TopRect.Top, TopText);
            aCanvas.TextOut(aDrawRect.Left + FRightRect.Left, aDrawRect.Top + FRightRect.Top, FRightText);
            aCanvas.TextOut(aDrawRect.Left + BottomRect.Left, aDrawRect.Top + BottomRect.Top, BottomText);
        }