protected override void DoPaintViewAfter(HCCanvas aCanvas, PaintInfo aPaintInfo) { base.DoPaintViewAfter(aCanvas, aPaintInfo); if ((FActiveItem != null) && (!this.ReadOnly) && this.Focused) { if (FTableToolBar.Visible) { if (aPaintInfo.ScaleX != 1) { SIZE vPt = new SIZE(); GDI.SetViewportExtEx(aCanvas.Handle, aPaintInfo.WindowWidth, aPaintInfo.WindowHeight, ref vPt); try { FTableToolBar.PaintTo(aCanvas, aPaintInfo.GetScaleX(FActiveItemRect.Left - FTableToolBar.Width + FToolOffset), aPaintInfo.GetScaleY(FActiveItemRect.Top));// + FToolOffset - FTableToolBar.Height); } finally { GDI.SetViewportExtEx(aCanvas.Handle, aPaintInfo.GetScaleX(aPaintInfo.WindowWidth), aPaintInfo.GetScaleY(aPaintInfo.WindowHeight), ref vPt); } } else { FTableToolBar.PaintTo(aCanvas, FActiveItemRect.Left - FTableToolBar.Width + FToolOffset, FActiveItemRect.Top);// - Style.LineSpaceMin / 2 + FToolOffset - FTableToolBar.Height); } } else if (FImageToolBar.Visible) { if (aPaintInfo.ScaleX != 1) { SIZE vPt = new SIZE(); GDI.SetViewportExtEx(aCanvas.Handle, aPaintInfo.WindowWidth, aPaintInfo.WindowHeight, ref vPt); try { FImageToolBar.PaintTo(aCanvas, aPaintInfo.GetScaleX(FActiveItemRect.Left), aPaintInfo.GetScaleY(FActiveItemRect.Top) + FToolOffset - FImageToolBar.Height); } finally { GDI.SetViewportExtEx(aCanvas.Handle, aPaintInfo.GetScaleX(aPaintInfo.WindowWidth), aPaintInfo.GetScaleY(aPaintInfo.WindowHeight), ref vPt); } } else { FImageToolBar.PaintTo(aCanvas, FActiveItemRect.Left, FActiveItemRect.Top + FToolOffset - FImageToolBar.Height); } } } }
private void DrawLineLastMrak(HCCanvas aCanvas, RECT aDrawRect, PaintInfo aPaintInfo) { aCanvas.Pen.BeginUpdate(); try { aCanvas.Pen.Width = 1; aCanvas.Pen.Style = HCPenStyle.psSolid; aCanvas.Pen.Color = HC.clActiveBorder; } finally { aCanvas.Pen.EndUpdate(); } if (aPaintInfo.ScaleX != 1) { SIZE vPt = new SIZE(); GDI.SetViewportExtEx(aCanvas.Handle, aPaintInfo.WindowWidth, aPaintInfo.WindowHeight, ref vPt); try { aCanvas.MoveTo(aPaintInfo.GetScaleX(aDrawRect.Right) + 4, aPaintInfo.GetScaleY(aDrawRect.Bottom) - 8); aCanvas.LineTo(aPaintInfo.GetScaleX(aDrawRect.Right) + 6, aPaintInfo.GetScaleY(aDrawRect.Bottom) - 8); aCanvas.LineTo(aPaintInfo.GetScaleX(aDrawRect.Right) + 6, aPaintInfo.GetScaleY(aDrawRect.Bottom) - 3); aCanvas.MoveTo(aPaintInfo.GetScaleX(aDrawRect.Right), aPaintInfo.GetScaleY(aDrawRect.Bottom) - 3); aCanvas.LineTo(aPaintInfo.GetScaleX(aDrawRect.Right) + 6, aPaintInfo.GetScaleY(aDrawRect.Bottom) - 3); aCanvas.MoveTo(aPaintInfo.GetScaleX(aDrawRect.Right) + 1, aPaintInfo.GetScaleY(aDrawRect.Bottom) - 4); aCanvas.LineTo(aPaintInfo.GetScaleX(aDrawRect.Right) + 1, aPaintInfo.GetScaleY(aDrawRect.Bottom) - 1); aCanvas.MoveTo(aPaintInfo.GetScaleX(aDrawRect.Right) + 2, aPaintInfo.GetScaleY(aDrawRect.Bottom) - 5); aCanvas.LineTo(aPaintInfo.GetScaleX(aDrawRect.Right) + 2, aPaintInfo.GetScaleY(aDrawRect.Bottom)); } finally { GDI.SetViewportExtEx(aCanvas.Handle, aPaintInfo.GetScaleX(aPaintInfo.WindowWidth), aPaintInfo.GetScaleY(aPaintInfo.WindowHeight), ref vPt); } } else { aCanvas.MoveTo(aDrawRect.Right + 4, aDrawRect.Bottom - 8); aCanvas.LineTo(aDrawRect.Right + 6, aDrawRect.Bottom - 8); aCanvas.LineTo(aDrawRect.Right + 6, aDrawRect.Bottom - 3); aCanvas.MoveTo(aDrawRect.Right, aDrawRect.Bottom - 3); aCanvas.LineTo(aDrawRect.Right + 6, aDrawRect.Bottom - 3); aCanvas.MoveTo(aDrawRect.Right + 1, aDrawRect.Bottom - 4); aCanvas.LineTo(aDrawRect.Right + 1, aDrawRect.Bottom - 1); aCanvas.MoveTo(aDrawRect.Right + 2, aDrawRect.Bottom - 5); aCanvas.LineTo(aDrawRect.Right + 2, aDrawRect.Bottom); } }
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); }
private void DrawLineLastMrak(HCCanvas ACanvas, RECT ADrawRect, PaintInfo APaintInfo) { ACanvas.Pen.BeginUpdate(); try { ACanvas.Pen.Width = 1; ACanvas.Pen.Style = HCPenStyle.psSolid; ACanvas.Pen.Color = HC.clActiveBorder; } finally { ACanvas.Pen.EndUpdate(); } SIZE vPt = new SIZE(); GDI.SetViewportExtEx(ACanvas.Handle, APaintInfo.WindowWidth, APaintInfo.WindowHeight, ref vPt); try { ACanvas.MoveTo(APaintInfo.GetScaleX(ADrawRect.Right) + 4, APaintInfo.GetScaleY(ADrawRect.Bottom) - 8); ACanvas.LineTo(APaintInfo.GetScaleX(ADrawRect.Right) + 6, APaintInfo.GetScaleY(ADrawRect.Bottom) - 8); ACanvas.LineTo(APaintInfo.GetScaleX(ADrawRect.Right) + 6, APaintInfo.GetScaleY(ADrawRect.Bottom) - 3); ACanvas.MoveTo(APaintInfo.GetScaleX(ADrawRect.Right), APaintInfo.GetScaleY(ADrawRect.Bottom) - 3); ACanvas.LineTo(APaintInfo.GetScaleX(ADrawRect.Right) + 6, APaintInfo.GetScaleY(ADrawRect.Bottom) - 3); ACanvas.MoveTo(APaintInfo.GetScaleX(ADrawRect.Right) + 1, APaintInfo.GetScaleY(ADrawRect.Bottom) - 4); ACanvas.LineTo(APaintInfo.GetScaleX(ADrawRect.Right) + 1, APaintInfo.GetScaleY(ADrawRect.Bottom) - 1); ACanvas.MoveTo(APaintInfo.GetScaleX(ADrawRect.Right) + 2, APaintInfo.GetScaleY(ADrawRect.Bottom) - 5); ACanvas.LineTo(APaintInfo.GetScaleX(ADrawRect.Right) + 2, APaintInfo.GetScaleY(ADrawRect.Bottom)); } finally { GDI.SetViewportExtEx(ACanvas.Handle, APaintInfo.GetScaleX(APaintInfo.WindowWidth), APaintInfo.GetScaleY(APaintInfo.WindowHeight), ref vPt); } }
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 (aPaintInfo.Print) { } else if (this.IsSelectComplate) { aCanvas.Brush.Color = aStyle.SelColor; aCanvas.FillRect(aDrawRect); } else if (FMouseIn) { aCanvas.Brush.Color = HC.clBtnFace; aCanvas.FillRect(aDrawRect); } aStyle.TextStyles[TextStyleNo].ApplyStyle(aCanvas, aPaintInfo.ScaleY / aPaintInfo.Zoom); if (!AutoSize) { RECT vClipBoxRect = new RECT(); GDI.GetClipBox(aCanvas.Handle, ref vClipBoxRect); IntPtr vPaintRegion = GDI.CreateRectRgn( aPaintInfo.GetScaleX(aDrawRect.Left), aPaintInfo.GetScaleY(aDrawRect.Top), aPaintInfo.GetScaleX(aDrawRect.Right), aPaintInfo.GetScaleY(aDrawRect.Bottom)); try { GDI.SelectClipRgn(aCanvas.Handle, vPaintRegion); DoPaintItems(aCanvas, aDrawRect, aPaintInfo); } finally { GDI.DeleteObject(vPaintRegion); } //vPaintRegion = GDI.CreateRectRgnIndirect(ref vRect); vPaintRegion = GDI.CreateRectRgn( aPaintInfo.GetScaleX(vClipBoxRect.Left), aPaintInfo.GetScaleY(vClipBoxRect.Top), aPaintInfo.GetScaleX(vClipBoxRect.Right), aPaintInfo.GetScaleY(vClipBoxRect.Bottom)); try { GDI.SelectClipRgn(aCanvas.Handle, vPaintRegion); } finally { GDI.DeleteObject(vPaintRegion); } } else { DoPaintItems(aCanvas, aDrawRect, aPaintInfo); } }