From e09ec2aab07c48cfe4daf4414ed5737deb53aff5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20M=C3=BCller?= <2566282+brotkrueml@users.noreply.github.com> Date: Wed, 15 Nov 2023 18:55:05 +0100 Subject: [PATCH] [TASK] Introduce custom types for GIFBUILDER properties (#903) Releases: main, 12.4, 11.5 --- .../Gifbuilder/ObjectNames/Crop/Index.rst | 2 +- .../Gifbuilder/ObjectNames/Scale/Index.rst | 4 +- Documentation/Gifbuilder/Properties.rst | 78 +++++++++---------- Documentation/Settings.cfg | 1 + 4 files changed, 42 insertions(+), 43 deletions(-) diff --git a/Documentation/Gifbuilder/ObjectNames/Crop/Index.rst b/Documentation/Gifbuilder/ObjectNames/Crop/Index.rst index eee2beb5..9b91b413 100644 --- a/Documentation/Gifbuilder/ObjectNames/Crop/Index.rst +++ b/Documentation/Gifbuilder/ObjectNames/Crop/Index.rst @@ -7,7 +7,7 @@ CROP ==== .. note:: - This object resets :ref:`workArea ` to the + This object resets :t3-gifbuilder-property:`workArea` to the new dimensions of the image! Properties diff --git a/Documentation/Gifbuilder/ObjectNames/Scale/Index.rst b/Documentation/Gifbuilder/ObjectNames/Scale/Index.rst index 087fc667..3dd9a4c8 100644 --- a/Documentation/Gifbuilder/ObjectNames/Scale/Index.rst +++ b/Documentation/Gifbuilder/ObjectNames/Scale/Index.rst @@ -9,8 +9,8 @@ SCALE This scales the GIFBUILDER object to the provided dimensions. .. note:: - This object resets :ref:`workArea ` to the - new dimensions of the image! + This object resets :t3-gifbuilder-property:`workArea` to the new dimensions + of the image! Properties diff --git a/Documentation/Gifbuilder/Properties.rst b/Documentation/Gifbuilder/Properties.rst index 216fda4b..34c9c6ef 100644 --- a/Documentation/Gifbuilder/Properties.rst +++ b/Documentation/Gifbuilder/Properties.rst @@ -14,7 +14,7 @@ Properties 1,2,3,4... ========== -.. option:: 1,2,3,4... +.. t3-gifbuilder-property:: 1,2,3,4... :Data type: :ref:`Gifbuilder Object ` + .if (:ref:`->if `) @@ -29,7 +29,7 @@ Properties backColor ========= -.. option:: backColor +.. t3-gifbuilder-property:: backColor :Data type: :t3-data-type:`GraphicColor` / :ref:`stdWrap ` :Default: white @@ -47,7 +47,7 @@ charRangeMap [array] ------- -.. option:: charRangeMap.[array] +.. t3-gifbuilder-property:: charRangeMap.[array] :Data type: string @@ -67,8 +67,8 @@ charRangeMap configuration into :t3-gifbuilder-text:`splitRendering` configuration of the individual :ref:`GIFBUILDER objects `. - In the :ref:`example below ` - the key is :typoscript:`123`. + In the :t3-gifbuilder-property:`charRangeMap.[array].pixelSpaceFontSizeRef` + example below the key is :typoscript:`123`. .. note:: If the key is already found in the local GIFBUILDER configuration the @@ -81,7 +81,7 @@ charRangeMap [array].charMapConfig --------------------- -.. option:: charRangeMap.[array].charMapConfig +.. t3-gifbuilder-property:: charRangeMap.[array].charMapConfig :Data type: :ref:`TEXT ` / :ref:`splitRendering.[array] ` configuration @@ -94,15 +94,14 @@ charRangeMap [array].fontSizeMultiplicator ----------------------------- -.. option:: charRangeMap.[array].fontSizeMultiplicator +.. t3-gifbuilder-property:: charRangeMap.[array].fontSizeMultiplicator :Data type: double If set, this will take the font size of the :ref:`GIFBUILDER TEXT object ` and multiply with this - amount (xx.xx) and override the :t3-gifbuilder-text:`fontSize` - property inside - :ref:`charMapConfig `. + amount (xx.xx) and override the :t3-gifbuilder-text:`fontSize` property + inside :t3-gifbuilder-property:`charRangeMap.[array].charMapConfig`. .. _gifbuilder-properties-charRangeMap-pixelSpaceFontSizeRef: @@ -110,7 +109,7 @@ charRangeMap [array].pixelSpaceFontSizeRef ----------------------------- -.. option:: charRangeMap.[array].pixelSpaceFontSizeRef +.. t3-gifbuilder-property:: charRangeMap.[array].pixelSpaceFontSizeRef :Data type: double @@ -154,7 +153,7 @@ charRangeMap format ====== -.. option:: format +.. t3-gifbuilder-property:: format :Data type: "gif" / "jpg" / "jpeg" / "png" :Default: gif @@ -163,8 +162,7 @@ format It is possible to define the quality of a JPG image globally via :ref:`$TYPO3_CONF_VARS['GFX']['jpg_quality'] ` - or via the :ref:`quality ` property on a per-image - basis. + or via the :t3-gifbuilder-property:`quality` property on a per-image basis. .. _gifbuilder-properties-maxHeight: @@ -172,7 +170,7 @@ format maxHeight ========= -.. option:: maxHeight +.. t3-gifbuilder-property:: maxHeight :Data type: positive integer / :ref:`stdWrap ` @@ -184,7 +182,7 @@ maxHeight maxWidth ======== -.. option:: maxWidth +.. t3-gifbuilder-property:: maxWidth :Data type: positive integer / :ref:`stdWrap ` @@ -196,7 +194,7 @@ maxWidth offset ====== -.. option:: offset +.. t3-gifbuilder-property:: offset :Data type: x,y :ref:`+calc ` / :ref:`stdWrap ` :Default: 0,0 @@ -209,11 +207,11 @@ offset quality ======= -.. option:: quality +.. t3-gifbuilder-property:: quality :Data type: positive integer (10-100) - JPG-quality (if :ref:`.format ` = jpg/jpeg) + JPG quality (if :t3-gifbuilder-property:`format` = jpg/jpeg) .. _gifbuilder-properties-reduceColors: @@ -221,35 +219,19 @@ quality reduceColors ============ -.. option:: reduceColors +.. t3-gifbuilder-property:: reduceColors :Data type: integer (1-255) / :ref:`stdWrap ` Reduce the number of colors. -.. _gifbuilder-properties-workArea: - -workArea -======== - -.. option:: workArea - - :Data type: x,y,w,h :ref:`+calc ` / :ref:`stdWrap ` - - Define the work area on the image file. All the - :ref:`GIFBUILDER objects ` will see this as the - dimensions of the image file regarding alignment, overlaying of images and - so on. Only :ref:`TEXT objects ` exceeding the boundaries - of the work area will be printed outside this area. - - .. _gifbuilder-properties-transparentBackground: transparentBackground ===================== -.. option:: transparentBackground +.. t3-gifbuilder-property:: transparentBackground :Data type: boolean / :ref:`stdWrap ` @@ -267,7 +249,7 @@ transparentBackground transparentColor ================ -.. option:: transparentColor +.. t3-gifbuilder-property:: transparentColor :Data type: :t3-data-type:`GraphicColor` / :ref:`stdWrap ` @@ -279,7 +261,7 @@ transparentColor closest ------- -.. option:: transparentColor.closest +.. t3-gifbuilder-property:: transparentColor.closest :Data Type: boolean @@ -291,12 +273,28 @@ closest :t3-gifbuilder-text:`niceText` option. +.. _gifbuilder-properties-workArea: + +workArea +======== + +.. t3-gifbuilder-property:: workArea + + :Data type: x,y,w,h :ref:`+calc ` / :ref:`stdWrap ` + + Define the work area on the image file. All the + :ref:`GIFBUILDER objects ` will see this as the + dimensions of the image file regarding alignment, overlaying of images and + so on. Only :ref:`TEXT objects ` exceeding the boundaries + of the work area will be printed outside this area. + + .. _gifbuilder-properties-XY: XY == -.. option:: XY +.. t3-gifbuilder-property:: XY :Data type: x,y :ref:`+calc ` (1-2000) / :ref:`stdWrap ` :Default: 120,50 diff --git a/Documentation/Settings.cfg b/Documentation/Settings.cfg index a1ebe55f..1ee8899c 100644 --- a/Documentation/Settings.cfg +++ b/Documentation/Settings.cfg @@ -83,6 +83,7 @@ t3-gifbuilder-ellipse = t3-gifbuilder-ellipse // t3-gifbuilder-ellipse // GIFBUI t3-gifbuilder-emboss = t3-gifbuilder-emboss // t3-gifbuilder-emboss // GIFBUILDER object EMBOSS t3-gifbuilder-image = t3-gifbuilder-image // t3-gifbuilder-image // GIFBUILDER object IMAGE t3-gifbuilder-outline = t3-gifbuilder-outline // t3-gifbuilder-outline // GIFBUILDER object OUTLINE +t3-gifbuilder-property = t3-gifbuilder-property // t3-gifbuilder-property // GIFBUILDER property t3-gifbuilder-scale = t3-gifbuilder-scale // t3-gifbuilder-scale // GIFBUILDER object SCALE t3-gifbuilder-shadow = t3-gifbuilder-shadow // t3-gifbuilder-shadow // GIFBUILDER object SHADOW t3-gifbuilder-text = t3-gifbuilder-text // t3-gifbuilder-text // GIFBUILDER object TEXT