GIMP Script-fu

Artifact Content

Artifact a21607b293992f2887d1181f28643129590324f0:

Wiki page [sg-calendar] by anonymous 2016-01-01 09:30:51.
D 2016-01-01T09:30:51.335
L sg-calendar
P ec31f8906e213cca4a9af474ffa65e2b430bfcbd
U anonymous
W 6007
<dt><b>Commands:</b> <dd>Calendar</dd>
                    <dd>Calendar year</dd></dt>
<dt><b>Menu:</b> <dd>"<Image>/Filters/Render/Calendar"</dd>
                 <dd>"<Image>/Filters/Render/Calendar year"</dd></dt>
<dt><b>PDB Name:</b> <dd>script-fu-sg-calendar</dd>
<dt><b>Download:</b> <dd>[|sg-calendar.scm] (after the page appears, click on the "Download" command) </dd></dt>
<dt><b>License:</b> <dd>[copyright|GPLv2+]</dd></dt>

<dt><b>Description (Calendar):</b> <dd>
This script provides two new commands which can be used to generate a calendar for a particular month or for an entire year. 

The Calendar command will generate two overlay layers which render a single month within the rectangular bounds of the selection, or of the entire drawable if no selection is present. The original selection/layer is left unmodified (it is basically only used for sizing purposes). The command only renders the days themselves and it is intended that the user will add their own banners for the month and year as desired. <i>This script is intended more as a tool to be used in creating calendars, and by itself does not produce completed results.</i> 

<center><img src="" alt="Broken Link"></center>

Currently, the only languages supported are English, German, Spanish, Italian, French, Hungarian, Polish, Russian, Serbian latin, Serbian cyrilic, Croatian, Slovenian, Macedonian, Swedish, and Catalan. Unfortunately, it is not possible for the Script-fu dialog to appear in non-English languages, but at least calendars can be created using them. If anyone wishes to have other languages supported, please submit a [|ticket] with appropriate translations for the names for months and weekdays.

Note that for some languages (currently only Catalan), the "Date Format" parameter is ignored and specific abbreviations for the week days are substituted. This is done so that the abbreviations can more easily be unique.

The Layout option specifies how varying number of weeks in a month are handled (a month may span anywhere from four to six weeks). "Allow six weeks" will use either five or six rows of weekdays, and size the numbers accordingly. "Force six weeks" will always produce six rows of weekdays regardless how many are needed. The last two options will always produce five rows of weekdays, and wrap any extra days as shown in the image below. The first option is generally best-suited for producing individual months, whereas the other options are more suited for multiple months being placed on the same image since the font sizes will be the same (regardless the number of weeks in the month).

<center><img src="" alt="Broken Link"></center>

Separate fonts can be specified for the text and numbers, with the active foreground color used in making them. A different color ("Border color") can be specified for drawing the grid lines; or the drawing of grid lines can be disabled completely by specifying "Border width" of zero.

The font size for the numbers can be specified using a percentage of the largest font that will fit within the date's containing "box". A font size specification of "100%" will completely fill the box, whereas one of "50%" will be sized to fill a region that has half the width and half the height of the date's box. The "Date position" option allows alignment of the resulting date within its box. 

The "Right justify" checkbox will prepend a space in front of single-digit dates in an attempt to force alignment with the double-digit dates -- owing to differences in character widths of proportionally spaced fonts, the result may not always be exactly what's desired.

Again, the script by itself is not intended to produce finished calendars, however, it can be easily used in creating calendars such as the following:

<center><img src="" alt="Broken Link"></center>

Problems with the script can be [|reported] using the [|ticketing system] (AKA bug tracker).

<dt><b>Description (Calendar Year):</b> <dd>

The Calendar Year command will render a multi-month calendar sized to fit within the active selection (or the active layer if there is no selection). The number of months can range from 1 to 12 and defaults to January through December. If the start month is after the end month then the end month occurs in the subsequent year. This allows, for example, calendars to be printed out for a typical school year (e.g., August to June).

The individual months are laid out in rows and positioned such that their spacing completely fills the selected region. The aspect ratio of each of the months is fixed such that the individual date cells are square.

The "Padding" parameter specifies the spacing that will appear between each of the individual months relative (expressed as a percentage of the entire width or height). Spacing is not automatically reserved for the month's name -- a "Padding" of zero will result in some overlap.

The other parameters of the Calendar Year dialog are identical to their counterparts in the Calendar dialog.
Problems with the script can be [|reported] using the [|ticketing system] (AKA bug tracker).

<hr><div id="7626812b3a8ff0e6"><i>On 2016-01-01 09:30:51 UTC anonymous added:</i><br />
</div id="7626812b3a8ff0e6">
Z 76cd778f5dc388cacadcf51360347f67