Skip to content

Commit

Permalink
[TASK] Introduce custom types for GIFBUILDER properties (TYPO3-Docume…
Browse files Browse the repository at this point in the history
…ntation#903)

Releases: main, 12.4, 11.5
  • Loading branch information
brotkrueml committed Nov 15, 2023
1 parent 67452c2 commit e09ec2a
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 43 deletions.
2 changes: 1 addition & 1 deletion Documentation/Gifbuilder/ObjectNames/Crop/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CROP
====

.. note::
This object resets :ref:`workArea <gifbuilder-properties-workArea>` to the
This object resets :t3-gifbuilder-property:`workArea` to the
new dimensions of the image!

Properties
Expand Down
4 changes: 2 additions & 2 deletions Documentation/Gifbuilder/ObjectNames/Scale/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ SCALE
This scales the GIFBUILDER object to the provided dimensions.

.. note::
This object resets :ref:`workArea <gifbuilder-properties-workArea>` to the
new dimensions of the image!
This object resets :t3-gifbuilder-property:`workArea` to the new dimensions
of the image!


Properties
Expand Down
78 changes: 38 additions & 40 deletions Documentation/Gifbuilder/Properties.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <gifbuilder-object-names>` + .if (:ref:`->if <if>`)

Expand All @@ -29,7 +29,7 @@ Properties
backColor
=========

.. option:: backColor
.. t3-gifbuilder-property:: backColor

:Data type: :t3-data-type:`GraphicColor` / :ref:`stdWrap <stdwrap>`
:Default: white
Expand All @@ -47,7 +47,7 @@ charRangeMap
[array]
-------

.. option:: charRangeMap.[array]
.. t3-gifbuilder-property:: charRangeMap.[array]

:Data type: string

Expand All @@ -67,8 +67,8 @@ charRangeMap
configuration into :t3-gifbuilder-text:`splitRendering`
configuration of the individual
:ref:`GIFBUILDER objects <gifbuilder-object-names>`.
In the :ref:`example below <gifbuilder-properties-charRangeMap-pixelSpaceFontSizeRef>`
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
Expand All @@ -81,7 +81,7 @@ charRangeMap
[array].charMapConfig
---------------------

.. option:: charRangeMap.[array].charMapConfig
.. t3-gifbuilder-property:: charRangeMap.[array].charMapConfig

:Data type: :ref:`TEXT <gifbuilder-text>` / :ref:`splitRendering.[array] <gifbuilder-text-splitRendering>` configuration

Expand All @@ -94,23 +94,22 @@ 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 <gifbuilder-text>` and multiply with this
amount (xx.xx) and override the :t3-gifbuilder-text:`fontSize`
property inside
:ref:`charMapConfig <gifbuilder-properties-charRangeMap-charMapConfig>`.
amount (xx.xx) and override the :t3-gifbuilder-text:`fontSize` property
inside :t3-gifbuilder-property:`charRangeMap.[array].charMapConfig`.


.. _gifbuilder-properties-charRangeMap-pixelSpaceFontSizeRef:

[array].pixelSpaceFontSizeRef
-----------------------------

.. option:: charRangeMap.[array].pixelSpaceFontSizeRef
.. t3-gifbuilder-property:: charRangeMap.[array].pixelSpaceFontSizeRef

:Data type: double

Expand Down Expand Up @@ -154,7 +153,7 @@ charRangeMap
format
======

.. option:: format
.. t3-gifbuilder-property:: format

:Data type: "gif" / "jpg" / "jpeg" / "png"
:Default: gif
Expand All @@ -163,16 +162,15 @@ format

It is possible to define the quality of a JPG image globally via
:ref:`$TYPO3_CONF_VARS['GFX']['jpg_quality'] <t3coreapi:typo3ConfVars_gfx_jpg_quality>`
or via the :ref:`quality <gifbuilder-properties-quality>` property on a per-image
basis.
or via the :t3-gifbuilder-property:`quality` property on a per-image basis.


.. _gifbuilder-properties-maxHeight:

maxHeight
=========

.. option:: maxHeight
.. t3-gifbuilder-property:: maxHeight

:Data type: positive integer / :ref:`stdWrap <stdwrap>`

Expand All @@ -184,7 +182,7 @@ maxHeight
maxWidth
========

.. option:: maxWidth
.. t3-gifbuilder-property:: maxWidth

:Data type: positive integer / :ref:`stdWrap <stdwrap>`

Expand All @@ -196,7 +194,7 @@ maxWidth
offset
======

.. option:: offset
.. t3-gifbuilder-property:: offset

:Data type: x,y :ref:`+calc <gifbuilder-calc>` / :ref:`stdWrap <stdwrap>`
:Default: 0,0
Expand All @@ -209,47 +207,31 @@ offset
quality
=======

.. option:: quality
.. t3-gifbuilder-property:: quality

:Data type: positive integer (10-100)

JPG-quality (if :ref:`.format <gifbuilder-properties-format>` = jpg/jpeg)
JPG quality (if :t3-gifbuilder-property:`format` = jpg/jpeg)


.. _gifbuilder-properties-reduceColors:

reduceColors
============

.. option:: reduceColors
.. t3-gifbuilder-property:: reduceColors

:Data type: integer (1-255) / :ref:`stdWrap <stdwrap>`

Reduce the number of colors.


.. _gifbuilder-properties-workArea:

workArea
========

.. option:: workArea

:Data type: x,y,w,h :ref:`+calc <gifbuilder-calc>` / :ref:`stdWrap <stdwrap>`

Define the work area on the image file. All the
:ref:`GIFBUILDER objects <gifbuilder-object-names>` will see this as the
dimensions of the image file regarding alignment, overlaying of images and
so on. Only :ref:`TEXT objects <gifbuilder-text>` 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 <stdwrap>`

Expand All @@ -267,7 +249,7 @@ transparentBackground
transparentColor
================

.. option:: transparentColor
.. t3-gifbuilder-property:: transparentColor

:Data type: :t3-data-type:`GraphicColor` / :ref:`stdWrap <stdwrap>`

Expand All @@ -279,7 +261,7 @@ transparentColor
closest
-------

.. option:: transparentColor.closest
.. t3-gifbuilder-property:: transparentColor.closest

:Data Type: boolean

Expand All @@ -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 <gifbuilder-calc>` / :ref:`stdWrap <stdwrap>`

Define the work area on the image file. All the
:ref:`GIFBUILDER objects <gifbuilder-object-names>` will see this as the
dimensions of the image file regarding alignment, overlaying of images and
so on. Only :ref:`TEXT objects <gifbuilder-text>` 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 <gifbuilder-calc>` (1-2000) / :ref:`stdWrap <stdwrap>`
:Default: 120,50
Expand Down
1 change: 1 addition & 0 deletions Documentation/Settings.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e09ec2a

Please sign in to comment.