noalyss-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Noalyss-commit] [noalyss] 14/29: Improve Code : permet d'avoir plusieur


From: dwm
Subject: [Noalyss-commit] [noalyss] 14/29: Improve Code : permet d'avoir plusieurs couleurs sur une ligne
Date: Sat, 6 Jan 2024 05:59:14 -0500 (EST)

sparkyx pushed a commit to branch devel
in repository noalyss.

commit 65a6d1b14a27ca729e4bc3ce3997ace7a7241a1a
Author: sparkyx <danydb@noalyss.eu>
AuthorDate: Sun Dec 17 12:08:20 2023 +0100

    Improve Code : permet d'avoir plusieurs couleurs sur une ligne
---
 include/lib/pdf_core.class.php | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/include/lib/pdf_core.class.php b/include/lib/pdf_core.class.php
index 3b4563889..9111751ea 100644
--- a/include/lib/pdf_core.class.php
+++ b/include/lib/pdf_core.class.php
@@ -184,7 +184,32 @@ class PDF_Core extends TFPDF
         }
         return false;
     }
-    private function print_row()
+
+    /**
+     * @brief print the current array of cell and reset it , if different 
colors are set on the same row
+     * you have to print it before changing
+     *@code
+     * // fill red , text white
+     * $this->SetFillColor(255,0,0);
+     * $this->SetTextColor(255,255,255);
+     * $this->write_cell(15,5,"PRICE",0,0,'R',fill:true);
+     *
+     * // print the cell without a linefeed
+     * $this->print_row();
+     *
+     * // text in black on green
+     *
+     * $this->SetTextColor(0,0,0);
+     * $this->SetFillColor(0,255,0);
+     *
+     * $this->write_cell(15,5,nbm($other['price']),0,0,'R');
+     *@endcode
+     * @see TFPDF::SetTextColor()
+     * @see TFPDF::SetFillColor()
+     * @see TFPDF::SetFontSize()
+     * @return void
+     */
+    protected function print_row()
     {
         static $e=0;
         $e++;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]