App-GUI-Harmonograph

 view release on metacpan or  search on metacpan

lib/App/GUI/Harmonograph.pm  view on Meta::CPAN

Below that is the second section with buttons that trigger color functions.
This helps you to compute related colors. To better understand their working
check the module L<Graphics::Toolkit::Color>. If you push the C<Gradient>
button that a smooth color gradient will be calculated between the leftmost
color number one and the currently selected color. The value after the
button skews the gradient towart the start (positive values) or the end
(negative values). The C<Complement> button also computes colors between
color one and the current but these will have equally distanced hues but
the same brightness and saturation. The text fields after the button
allow you to skew the brightness and saturation. Behind that, at the
rightmost position are two buttons to move the currently selected color
around.

The third section below that displays the colors than can be used to draw
the picture. They are ten colors, numbered from left to right. Below
each color field there is a second rectangle showing the status of the
color. If this rectangle is empty, the status is normal (used). If it's
crossed out, them the color is inactive because in the visual settings
you choose to use less than ten colors. The third option is selected
color. To select a color, just click on the rectangle displaying that
color or the status rectangle below. Then the status will show an arrow
down.

This means the section below displays the values of this color.
And the values can also be changed there. First your have the I<red> (R),
I<green> (G) and I<blue> (B) values of the RGB color space. below that
are ones of HSB: I<hue>, I<saturation> and I<lightness>. These are more
meaningful to the human mind. At the right end of each row that shows
amd changes one color value is a button with a question mark. Push
that to randomize this one value.

The last and fifth section is analogous to the first one. It is a store
for your favorite single colors. Just load and safe the currently selected
color via the buttons. Be again cautious with the C<Del> button.

=head2 Commands

In the lower left corner are two rows of command buttons. All other
commands are in the menu.

The lower left part of the window contains buttons in two rows.
The upper row is just for drawing the complete image. It has a progress
bar and the draw button. If the progress bar is white, you see just a sketch
drawing - a preview of the full image that can be computed fast enought
to react to all setting changes. If you push the draw button (or <Ctrl>+<S>),
you will get a full image and the progress bar has the color of the drawing
and also can show you the color progression over time, so you can see,
which are the early and the later parts of the drawing.

The second button row is for easy mass production of drawings.
The three text fields are combined the parts of the file path.
The first text field is naturally the directory where the files get saved.
You can change it by pushing the I<Dir> in front (left) of the text button
and use the then opening  Dir-Dialog to select another directory.
The second text field holds the base file name, which has to be inserted
by clicking on in and typing. The third text field is the file number and
is readonly. That counter increments automatically when a file is generated.
The complete file path is <dir>+<base name>+'_'+<counter>+<file ending>.
The file ending is I<.ini> for setting files and I<.jpg> or I<.png> or I<.svg>
for image files. The exact ending depends on what is the current configuration
set in the image > format menu. Lets say your directory is
"/home/user/images/h" and the base file name is beauty. If there is already
a file "/home/user/images/h/beauty_4.png" - the program will detect that
and set the counter to 5. You can play with the settings and than (no matter
if there is currently a complete drawing or not) push the I<Save> button
to produce a complete drawing into "/home/user/images/h/beauty_5.png".
If you push the I<INI> button you safe the current settings into
"/home/user/images/h/beauty_5.ini". This file can later be loaded via
settings menu to restore the current state of all buttons in the tabs.


=head2 Menu

The upmost menu bar has only three very simple menus.
Please not that each menu shows which key combination triggers the same
command and while hovering over an menu item you see a short help text
the left status bar field.

The first menu is for loading and storing setting files with arbitrary
names. I recommend giving them the file ending C<.ini> for transparency
reasons. A submenu allows a quick load of the recently used files.
The first entry lets you reset the whole program to the starting state
and the last is just to exit (safely with saving the configs).

The second menu has only two commands for drawing an complete image
and saving it in an arbitrary named PNG, JPG or SVG file (the file ending decides).
The submenu above only sets the preferred format, which is the format
of the serially save images by the command buttons in the left lower corner.
The preferred file format is also the first wild card in the save dialog.
Above that is another submenu for setting the image size.

The third menu has only one item to oben the I<about> - dialog,
where you can see which perl, Wx and other versions you are currently using.


=head1 SEE ALSO

L<App::GUI::Cellgraph>

L<App::GUI::Juliagraph>

L<App::GUI::Sierpingraph>

L<App::GUI::Spirograph>

=head1 AUTHOR

Herbert Breunung (lichtkind@cpan.org)

=head1 COPYRIGHT & LICENSE

Copyright(c) 2022-25 by Herbert Breunung

All rights reserved.
This program is free software and can be used, changed and distributed
under the GPL 3 licence.

=cut



( run in 0.642 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )