renamed GIMP_GRID_TYPE_INTERSECTION to GIMP_GRID_TYPE_INTERSECTIONS, added
2003-07-28 Henrik Brix Andersen <brix@gimp.org> * app/core/core-enums.h (GimpGridType): renamed GIMP_GRID_TYPE_INTERSECTION to GIMP_GRID_TYPE_INTERSECTIONS, added GIMP_GRID_TYPE_DOTS * app/core/core-enums.c: regenerated * app/gui/grid-dialog.c * app/core/gimpgrid.c: changed accordingly * app/display/gimpdisplayshell.c (gimp_display_shell_draw_grid): added code to draw the dots-only grid
This commit is contained in:

committed by
Henrik Brix Andersen

parent
c217e77cb1
commit
351557433b
14
ChangeLog
14
ChangeLog
@ -1,3 +1,17 @@
|
||||
2003-07-28 Henrik Brix Andersen <brix@gimp.org>
|
||||
|
||||
* app/core/core-enums.h (GimpGridType): renamed
|
||||
GIMP_GRID_TYPE_INTERSECTION to GIMP_GRID_TYPE_INTERSECTIONS, added
|
||||
GIMP_GRID_TYPE_DOTS
|
||||
|
||||
* app/core/core-enums.c: regenerated
|
||||
|
||||
* app/gui/grid-dialog.c
|
||||
* app/core/gimpgrid.c: changed accordingly
|
||||
|
||||
* app/display/gimpdisplayshell.c (gimp_display_shell_draw_grid):
|
||||
added code to draw the dots-only grid
|
||||
|
||||
2003-07-28 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/paint-funcs/paint-funcs.c (initial_sub_region)
|
||||
|
@ -215,7 +215,8 @@ gimp_gradient_type_get_type (void)
|
||||
|
||||
static const GEnumValue gimp_grid_type_enum_values[] =
|
||||
{
|
||||
{ GIMP_GRID_TYPE_INTERSECTION, N_("Intersections Only"), "intersection" },
|
||||
{ GIMP_GRID_TYPE_DOTS, N_("Dots"), "dots" },
|
||||
{ GIMP_GRID_TYPE_INTERSECTIONS, N_("Intersections Only"), "intersections" },
|
||||
{ GIMP_GRID_TYPE_ON_OFF_DASH, N_("Dashed"), "on-off-dash" },
|
||||
{ GIMP_GRID_TYPE_DOUBLE_DASH, N_("Double Dashed"), "double-dash" },
|
||||
{ GIMP_GRID_TYPE_SOLID, N_("Solid"), "solid" },
|
||||
|
@ -176,7 +176,8 @@ GType gimp_grid_type_get_type (void) G_GNUC_CONST;
|
||||
|
||||
typedef enum /*< pdb-skip >*/
|
||||
{
|
||||
GIMP_GRID_TYPE_INTERSECTION, /*< desc="Intersections Only" >*/
|
||||
GIMP_GRID_TYPE_DOTS, /*< desc="Dots" >*/
|
||||
GIMP_GRID_TYPE_INTERSECTIONS, /*< desc="Intersections Only" >*/
|
||||
GIMP_GRID_TYPE_ON_OFF_DASH, /*< desc="Dashed" >*/
|
||||
GIMP_GRID_TYPE_DOUBLE_DASH, /*< desc="Double Dashed" >*/
|
||||
GIMP_GRID_TYPE_SOLID /*< desc="Solid" >*/
|
||||
|
@ -157,7 +157,7 @@ gimp_grid_class_init (GimpGridClass *klass)
|
||||
GIMP_CONFIG_INSTALL_PROP_ENUM (object_class, PROP_TYPE,
|
||||
"type", NULL,
|
||||
GIMP_TYPE_GRID_TYPE,
|
||||
GIMP_GRID_TYPE_INTERSECTION,
|
||||
GIMP_GRID_TYPE_INTERSECTIONS,
|
||||
0);
|
||||
}
|
||||
|
||||
|
@ -131,7 +131,7 @@ grid_dialog_new (GimpDisplay *gdisp)
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
||||
type = gimp_prop_enum_option_menu_new (G_OBJECT (grid), "type",
|
||||
GIMP_GRID_TYPE_INTERSECTION,
|
||||
GIMP_GRID_TYPE_DOTS,
|
||||
GIMP_GRID_TYPE_SOLID);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Line _Style:"), 1.0, 0.5,
|
||||
|
@ -1416,10 +1416,6 @@ gimp_display_shell_draw_grid (GimpDisplayShell *shell)
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case GIMP_GRID_TYPE_INTERSECTION:
|
||||
values.line_style = GDK_LINE_SOLID;
|
||||
break;
|
||||
|
||||
case GIMP_GRID_TYPE_ON_OFF_DASH:
|
||||
values.line_style = GDK_LINE_ON_OFF_DASH;
|
||||
break;
|
||||
@ -1428,6 +1424,8 @@ gimp_display_shell_draw_grid (GimpDisplayShell *shell)
|
||||
values.line_style = GDK_LINE_DOUBLE_DASH;
|
||||
break;
|
||||
|
||||
case GIMP_GRID_TYPE_DOTS:
|
||||
case GIMP_GRID_TYPE_INTERSECTIONS:
|
||||
case GIMP_GRID_TYPE_SOLID:
|
||||
values.line_style = GDK_LINE_SOLID;
|
||||
break;
|
||||
@ -1455,7 +1453,23 @@ gimp_display_shell_draw_grid (GimpDisplayShell *shell)
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case GIMP_GRID_TYPE_INTERSECTION:
|
||||
case GIMP_GRID_TYPE_DOTS:
|
||||
for (x = xoffset; x <= shell->gdisp->gimage->width; x += xspacing)
|
||||
{
|
||||
for (y = yoffset; y <= shell->gdisp->gimage->height; y += yspacing)
|
||||
{
|
||||
gimp_display_shell_transform_xy (shell, x, y, &x_real, &y_real, FALSE);
|
||||
if (x_real >= x1 && x_real < x2 && y_real >= y1 && y_real < y2)
|
||||
{
|
||||
gdk_draw_line (shell->canvas->window, gc,
|
||||
x_real, y_real,
|
||||
x_real, y_real);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case GIMP_GRID_TYPE_INTERSECTIONS:
|
||||
for (x = xoffset; x <= shell->gdisp->gimage->width; x += xspacing)
|
||||
{
|
||||
for (y = yoffset; y <= shell->gdisp->gimage->height; y += yspacing)
|
||||
|
@ -1416,10 +1416,6 @@ gimp_display_shell_draw_grid (GimpDisplayShell *shell)
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case GIMP_GRID_TYPE_INTERSECTION:
|
||||
values.line_style = GDK_LINE_SOLID;
|
||||
break;
|
||||
|
||||
case GIMP_GRID_TYPE_ON_OFF_DASH:
|
||||
values.line_style = GDK_LINE_ON_OFF_DASH;
|
||||
break;
|
||||
@ -1428,6 +1424,8 @@ gimp_display_shell_draw_grid (GimpDisplayShell *shell)
|
||||
values.line_style = GDK_LINE_DOUBLE_DASH;
|
||||
break;
|
||||
|
||||
case GIMP_GRID_TYPE_DOTS:
|
||||
case GIMP_GRID_TYPE_INTERSECTIONS:
|
||||
case GIMP_GRID_TYPE_SOLID:
|
||||
values.line_style = GDK_LINE_SOLID;
|
||||
break;
|
||||
@ -1455,7 +1453,23 @@ gimp_display_shell_draw_grid (GimpDisplayShell *shell)
|
||||
|
||||
switch (type)
|
||||
{
|
||||
case GIMP_GRID_TYPE_INTERSECTION:
|
||||
case GIMP_GRID_TYPE_DOTS:
|
||||
for (x = xoffset; x <= shell->gdisp->gimage->width; x += xspacing)
|
||||
{
|
||||
for (y = yoffset; y <= shell->gdisp->gimage->height; y += yspacing)
|
||||
{
|
||||
gimp_display_shell_transform_xy (shell, x, y, &x_real, &y_real, FALSE);
|
||||
if (x_real >= x1 && x_real < x2 && y_real >= y1 && y_real < y2)
|
||||
{
|
||||
gdk_draw_line (shell->canvas->window, gc,
|
||||
x_real, y_real,
|
||||
x_real, y_real);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case GIMP_GRID_TYPE_INTERSECTIONS:
|
||||
for (x = xoffset; x <= shell->gdisp->gimage->width; x += xspacing)
|
||||
{
|
||||
for (y = yoffset; y <= shell->gdisp->gimage->height; y += yspacing)
|
||||
|
@ -131,7 +131,7 @@ grid_dialog_new (GimpDisplay *gdisp)
|
||||
gtk_container_add (GTK_CONTAINER (frame), table);
|
||||
|
||||
type = gimp_prop_enum_option_menu_new (G_OBJECT (grid), "type",
|
||||
GIMP_GRID_TYPE_INTERSECTION,
|
||||
GIMP_GRID_TYPE_DOTS,
|
||||
GIMP_GRID_TYPE_SOLID);
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Line _Style:"), 1.0, 0.5,
|
||||
|
Reference in New Issue
Block a user