# PIKA - Photo and Image Kooker Application
# Copyright (C) 1995 Spencer Kimball and Peter Mattis
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see .
sub image_grid_get_spacing {
$blurb = "Gets the spacing of an image's grid.";
$help = < 'image', type => 'image',
desc => 'The image' }
);
@outargs = (
{ name => 'xspacing', type => 'float', void_ret => 1,
desc => "The image's grid horizontal spacing" },
{ name => 'yspacing', type => 'float', void_ret => 1,
desc => "The image's grid vertical spacing" }
);
%invoke = (
code => <<'CODE'
{
PikaGrid *grid = pika_image_get_grid (image);
if (grid)
g_object_get (grid,
"xspacing", &xspacing,
"yspacing", &yspacing,
NULL);
else
success = FALSE;
}
CODE
);
}
sub image_grid_set_spacing {
$blurb = "Sets the spacing of an image's grid.";
$help = < 'image', type => 'image',
desc => 'The image' },
{ name => 'xspacing', type => 'float',
desc => "The image's grid horizontal spacing" },
{ name => 'yspacing', type => 'float',
desc => "The image's grid vertical spacing" }
);
%invoke = (
code => < 'image', type => 'image',
desc => 'The image' }
);
@outargs = (
{ name => 'xoffset', type => 'float', void_ret => 1,
desc => "The image's grid horizontal offset" },
{ name => 'yoffset', type => 'float', void_ret => 1,
desc => "The image's grid vertical offset" }
);
%invoke = (
code => <<'CODE'
{
PikaGrid *grid = pika_image_get_grid (image);
if (grid)
g_object_get (grid,
"xoffset", &xoffset,
"yoffset", &yoffset,
NULL);
else
success = FALSE;
}
CODE
);
}
sub image_grid_set_offset {
$blurb = "Sets the offset of an image's grid.";
$help = < 'image', type => 'image',
desc => 'The image' },
{ name => 'xoffset', type => 'float',
desc => "The image's grid horizontal offset" },
{ name => 'yoffset', type => 'float',
desc => "The image's grid vertical offset" }
);
%invoke = (
code => < 'image', type => 'image',
desc => 'The image' }
);
@outargs = (
{ name => 'fgcolor', type => 'color', has_alpha => 1, void_ret => 1,
desc => "The image's grid foreground color" }
);
%invoke = (
code => <<'CODE'
{
PikaGrid *grid = pika_image_get_grid (image);
if (grid)
fgcolor = grid->fgcolor;
else
success = FALSE;
}
CODE
);
}
sub image_grid_set_foreground_color {
$blurb = "Gets the foreground color of an image's grid.";
$help = < 'image', type => 'image',
desc => 'The image' },
{ name => 'fgcolor', type => 'color', has_alpha => 1,
desc => "The new foreground color" }
);
%invoke = (
code => <<'CODE'
{
PikaGrid *grid = pika_image_get_grid (image);
if (grid)
g_object_set (grid, "fgcolor", &fgcolor, NULL);
else
success = FALSE;
}
CODE
);
}
sub image_grid_get_background_color {
$blurb = "Sets the background color of an image's grid.";
$help = < 'image', type => 'image',
desc => 'The image' }
);
@outargs = (
{ name => 'bgcolor', type => 'color', has_alpha => 1, void_ret => 1,
desc => "The image's grid background color" }
);
%invoke = (
code => <<'CODE'
{
PikaGrid *grid = pika_image_get_grid (image);
if (grid)
bgcolor = grid->bgcolor;
else
success = FALSE;
}
CODE
);
}
sub image_grid_set_background_color {
$blurb = "Gets the background color of an image's grid.";
$help = < 'image', type => 'image',
desc => 'The image' },
{ name => 'bgcolor', type => 'color', has_alpha => 1,
desc => "The new background color" }
);
%invoke = (
code => <<'CODE'
{
PikaGrid *grid = pika_image_get_grid (image);
if (grid)
g_object_set (grid, "bgcolor", &bgcolor, NULL);
else
success = FALSE;
}
CODE
);
}
sub image_grid_get_style {
$blurb = "Gets the style of an image's grid.";
$help = < 'image', type => 'image',
desc => 'The image' }
);
@outargs = (
{ name => 'style', type => 'enum PikaGridStyle',
desc => "The image's grid style" }
);
%invoke = (
code => < 'image', type => 'image',
desc => 'The image' },
{ name => 'style', type => 'enum PikaGridStyle',
desc => "The image's grid style" }
);
%invoke = (
code => < [@procs], lib => [@procs]);
$desc = 'Image grid procedures';
$doc_title = 'pikaimagegrid';
$doc_short_desc = "Functions manuipulating an image's grid.";
$doc_long_desc = "Functions manuipulating an image's grid.";
1;