diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-03-30 19:19:10 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-03-30 19:19:10 +0900 |
commit | cf5326589a1c4d0b795ed0e91c837ab7dcc9f783 (patch) | |
tree | 0af9a4b5b31745ea71740c5982aa9fbe496e3871 | |
parent | cd40bd47a803027e597c5551fe3ceff059ed9199 (diff) | |
download | gtk3-tqt-engine-master.tar.gz gtk3-tqt-engine-master.zip |
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r-- | tdegtk/tdegtk-draw.cpp | 2 | ||||
-rw-r--r-- | tdegtk/tdegtk-utils.cpp | 2 | ||||
-rw-r--r-- | tdegtk/tqtcairopainter.cpp | 32 | ||||
-rw-r--r-- | tdegtk/tqtcairopainter.h | 4 | ||||
-rw-r--r-- | tests/test-painter.cpp | 2 |
5 files changed, 21 insertions, 21 deletions
diff --git a/tdegtk/tdegtk-draw.cpp b/tdegtk/tdegtk-draw.cpp index 28c6987..be593ca 100644 --- a/tdegtk/tdegtk-draw.cpp +++ b/tdegtk/tdegtk-draw.cpp @@ -569,7 +569,7 @@ draw_progressbar_frame(DRAW_ARGS, const GtkWidgetPath* path, GtkStateFlags state m.rotate(-90.0); m.translate((allocation.height)*(-1.0), 0); - p.setWorldMatrix(m, TRUE); + p.setWorldMatrix(m, true); boundingRect = TQRect(0, 0, allocation.height, allocation.width); ceData.rect = boundingRect; diff --git a/tdegtk/tdegtk-utils.cpp b/tdegtk/tdegtk-utils.cpp index ad93793..6c19767 100644 --- a/tdegtk/tdegtk-utils.cpp +++ b/tdegtk/tdegtk-utils.cpp @@ -670,7 +670,7 @@ { gtk_container_adjust_buttons_state( GTK_CONTAINER( tabLabel ) ); } } - return FALSE; + return false; } //________________________________________________________ diff --git a/tdegtk/tqtcairopainter.cpp b/tdegtk/tqtcairopainter.cpp index f680e9c..e1c3697 100644 --- a/tdegtk/tqtcairopainter.cpp +++ b/tdegtk/tqtcairopainter.cpp @@ -425,12 +425,12 @@ void TQt3CairoPaintDevice::dualStrokePen() { if (m_bgColorMode == TQt::OpaqueMode) { // Draw background cairo_save(FASTEST_AVAILABLE_PAINTER); - updatePen(TRUE); + updatePen(true); cairo_stroke(FASTEST_AVAILABLE_PAINTER); cairo_restore(FASTEST_AVAILABLE_PAINTER); } // Draw foreground - updatePen(FALSE); + updatePen(false); cairo_stroke(FASTEST_AVAILABLE_PAINTER); m_transferNeeded = true; } @@ -439,12 +439,12 @@ void TQt3CairoPaintDevice::dualStrokeBrush(cairo_fill_rule_t fillMethod) { if (m_bgColorMode == TQt::OpaqueMode) { // Draw background cairo_save(FASTEST_AVAILABLE_PAINTER); - updateBrush(TRUE, fillMethod); + updateBrush(true, fillMethod); cairo_fill(FASTEST_AVAILABLE_PAINTER); cairo_restore(FASTEST_AVAILABLE_PAINTER); } // Draw foreground - updateBrush(FALSE, fillMethod); + updateBrush(false, fillMethod); cairo_fill(FASTEST_AVAILABLE_PAINTER); m_transferNeeded = true; } @@ -469,8 +469,8 @@ void TQt3CairoPaintDevice::updatePen(bool backgroundStroke) { */ int dot = m_pen.width(); // width of a dot int fudge = 1; - //bool allow_zero_lw = TRUE; - bool allow_zero_lw = FALSE; + //bool allow_zero_lw = true; + bool allow_zero_lw = false; if ( dot <= 1 ) { dot = 3; fudge = 2; @@ -484,13 +484,13 @@ void TQt3CairoPaintDevice::updatePen(bool backgroundStroke) { dashes[0] = fudge * 3 * dot; dashes[1] = fudge * dot; dash_len = 2; - allow_zero_lw = FALSE; + allow_zero_lw = false; break; case TQPainter::DotLine: dashes[0] = dot; dashes[1] = dot; dash_len = 2; - allow_zero_lw = FALSE; + allow_zero_lw = false; break; case TQPainter::DashDotLine: dashes[0] = 3 * dot; @@ -498,7 +498,7 @@ void TQt3CairoPaintDevice::updatePen(bool backgroundStroke) { dashes[2] = dot; dashes[3] = fudge * dot; dash_len = 4; - allow_zero_lw = FALSE; + allow_zero_lw = false; break; case TQPainter::DashDotDotLine: dashes[0] = 3 * dot; @@ -508,14 +508,14 @@ void TQt3CairoPaintDevice::updatePen(bool backgroundStroke) { dashes[4] = dot; dashes[5] = dot; dash_len = 6; - allow_zero_lw = FALSE; + allow_zero_lw = false; break; case TQPainter::FineDotLine: dot = 1; dashes[0] = dot; dashes[1] = dot; dash_len = 2; - allow_zero_lw = FALSE; + allow_zero_lw = false; } Q_ASSERT( dash_len <= (int) sizeof(dashes) ); @@ -1050,7 +1050,7 @@ void TQt3CairoPaintDevice::drawText(TQPainter *p, int x, int y, const TQString & int baseline_y = pango_layout_get_baseline(layout)/PANGO_SCALE; cairo_new_path(FASTEST_AVAILABLE_PAINTER); cairo_move_to(FASTEST_AVAILABLE_PAINTER, x, y-baseline_y); - updatePen(FALSE); + updatePen(false); pango_cairo_update_layout(FASTEST_AVAILABLE_PAINTER, layout); pango_cairo_layout_path(FASTEST_AVAILABLE_PAINTER, layout); @@ -1144,7 +1144,7 @@ void TQt3CairoPaintDevice::drawTextInRect(TQPainter *p, TQRect rect, int textFla cairo_new_path(FASTEST_AVAILABLE_PAINTER); cairo_move_to(FASTEST_AVAILABLE_PAINTER, rect.x(), rect.y() + fudgedOffsetY); - updatePen(FALSE); + updatePen(false); pango_cairo_update_layout(FASTEST_AVAILABLE_PAINTER, layout); pango_cairo_layout_path(FASTEST_AVAILABLE_PAINTER, layout); @@ -1227,7 +1227,7 @@ TQt3CairoPaintDevice::TQt3CairoPaintDevice( cairo_surface_t *cairosurface, int x else { m_surface = cairosurface; } - m_worldMatrixStack.setAutoDelete(TRUE); + m_worldMatrixStack.setAutoDelete(true); m_tabStops = pango_tab_array_new(0, false); m_tabStopArray = pango_tab_array_new(0, false); @@ -1348,7 +1348,7 @@ bool TQt3CairoPaintDevice::cmd( int c, TQPainter *pt, TQPDevCmdParam *p ) if (m_pen.style() != TQPen::NoPen) { cairo_move_to(FASTEST_AVAILABLE_PAINTER, x+CAIRO_PEN_PIXEL_OFFSET, y+CAIRO_PEN_PIXEL_OFFSET); cairo_line_to(FASTEST_AVAILABLE_PAINTER, x+CAIRO_PEN_PIXEL_OFFSET, y+CAIRO_PEN_PIXEL_OFFSET); - updatePen(FALSE); + updatePen(false); cairo_set_line_cap(FASTEST_AVAILABLE_PAINTER, CAIRO_LINE_CAP_ROUND); cairo_stroke(FASTEST_AVAILABLE_PAINTER); } @@ -1955,7 +1955,7 @@ bool TQt3CairoPaintDevice::cmd( int c, TQPainter *pt, TQPDevCmdParam *p ) #endif } - return TRUE; + return true; } diff --git a/tdegtk/tqtcairopainter.h b/tdegtk/tqtcairopainter.h index c8f53de..874e599 100644 --- a/tdegtk/tqtcairopainter.h +++ b/tdegtk/tqtcairopainter.h @@ -55,10 +55,10 @@ class TQ_EXPORT TQt3CairoPaintDevice : public TQPaintDevice // picture class void transferIntermediateSurface(); bool intermediateSurfaceInUse() const; - void updatePen(bool backgroundStroke=FALSE); + void updatePen(bool backgroundStroke=false); void dualStrokePen(); - void updateBrush(bool backgroundStroke=FALSE, cairo_fill_rule_t fillMethod=CAIRO_FILL_RULE_WINDING); + void updateBrush(bool backgroundStroke=false, cairo_fill_rule_t fillMethod=CAIRO_FILL_RULE_WINDING); void dualStrokeBrush(cairo_fill_rule_t fillMethod=CAIRO_FILL_RULE_WINDING); void drawPolygon(const TQPointArray* pointarray, bool winding, bool fill, bool close); diff --git a/tests/test-painter.cpp b/tests/test-painter.cpp index 9f5ba89..67d0eee 100644 --- a/tests/test-painter.cpp +++ b/tests/test-painter.cpp @@ -385,7 +385,7 @@ main (int argc, char *argv[]) // cairo_stroke (cr); // Initialize TQApplication required data structures - new TQApplication(argc, argv, TRUE); + new TQApplication(argc, argv, true); TQt3CairoPaintDevice pd(surface); runTests(&pd); |