mirror of https://github.com/GNOME/gimp.git
app: rename gimpdisplayshell-style to gimpcanvas-style
because it doesn't and shouldn't depend on GimpDisplayShell at all. In the future, it will take its defaults from the canvas' theme.
This commit is contained in:
parent
64c929a1d1
commit
52b92e740f
|
@ -19,6 +19,8 @@ libappdisplay_a_sources = \
|
|||
display-types.h \
|
||||
gimpcanvas.c \
|
||||
gimpcanvas.h \
|
||||
gimpcanvas-style.c \
|
||||
gimpcanvas-style.h \
|
||||
gimpcanvasarc.c \
|
||||
gimpcanvasarc.h \
|
||||
gimpcanvasboundary.c \
|
||||
|
@ -119,8 +121,6 @@ libappdisplay_a_sources = \
|
|||
gimpdisplayshell-scroll.h \
|
||||
gimpdisplayshell-selection.c \
|
||||
gimpdisplayshell-selection.h \
|
||||
gimpdisplayshell-style.c \
|
||||
gimpdisplayshell-style.h \
|
||||
gimpdisplayshell-title.c \
|
||||
gimpdisplayshell-title.h \
|
||||
gimpdisplayshell-tool-events.c \
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpdisplayshell-style.c
|
||||
* gimpcanvas-style.c
|
||||
* Copyright (C) 2010 Michael Natterer <mitch@gimp.org>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
@ -32,8 +32,7 @@
|
|||
#include "core/gimpgrid.h"
|
||||
#include "core/gimplayer.h"
|
||||
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpdisplayshell-style.h"
|
||||
#include "gimpcanvas-style.h"
|
||||
|
||||
|
||||
static const GimpRGB guide_normal_fg = { 0.0, 0.0, 0.0, 1.0 };
|
||||
|
@ -78,13 +77,13 @@ static const GimpRGB tool_fg_highlight = { 1.0, 0.8, 0.2, 0.8 };
|
|||
/* public functions */
|
||||
|
||||
void
|
||||
gimp_display_shell_set_guide_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
gboolean active)
|
||||
gimp_canvas_set_guide_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active)
|
||||
{
|
||||
cairo_pattern_t *pattern;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (GTK_IS_WIDGET (canvas));
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
|
@ -103,11 +102,11 @@ gimp_display_shell_set_guide_style (GimpDisplayShell *shell,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_sample_point_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
gboolean active)
|
||||
gimp_canvas_set_sample_point_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (GTK_IS_WIDGET (canvas));
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
|
@ -119,11 +118,11 @@ gimp_display_shell_set_sample_point_style (GimpDisplayShell *shell,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_grid_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
GimpGrid *grid)
|
||||
gimp_canvas_set_grid_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
GimpGrid *grid)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (GTK_IS_WIDGET (canvas));
|
||||
g_return_if_fail (cr != NULL);
|
||||
g_return_if_fail (GIMP_IS_GRID (grid));
|
||||
|
||||
|
@ -163,12 +162,12 @@ gimp_display_shell_set_grid_style (GimpDisplayShell *shell,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_pen_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
const GimpRGB *color,
|
||||
gint width)
|
||||
gimp_canvas_set_pen_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
const GimpRGB *color,
|
||||
gint width)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (GTK_IS_WIDGET (canvas));
|
||||
g_return_if_fail (cr != NULL);
|
||||
g_return_if_fail (color != NULL);
|
||||
|
||||
|
@ -181,13 +180,13 @@ gimp_display_shell_set_pen_style (GimpDisplayShell *shell,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_layer_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
GimpLayer *layer)
|
||||
gimp_canvas_set_layer_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
GimpLayer *layer)
|
||||
{
|
||||
cairo_pattern_t *pattern;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (GTK_IS_WIDGET (canvas));
|
||||
g_return_if_fail (cr != NULL);
|
||||
g_return_if_fail (GIMP_IS_LAYER (layer));
|
||||
|
||||
|
@ -219,12 +218,12 @@ gimp_display_shell_set_layer_style (GimpDisplayShell *shell,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_selection_out_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr)
|
||||
gimp_canvas_set_selection_out_style (GtkWidget *canvas,
|
||||
cairo_t *cr)
|
||||
{
|
||||
cairo_pattern_t *pattern;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (GTK_IS_WIDGET (canvas));
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
|
@ -238,13 +237,13 @@ gimp_display_shell_set_selection_out_style (GimpDisplayShell *shell,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_selection_in_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
gint index)
|
||||
gimp_canvas_set_selection_in_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gint index)
|
||||
{
|
||||
cairo_pattern_t *pattern;
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (GTK_IS_WIDGET (canvas));
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
|
@ -258,11 +257,11 @@ gimp_display_shell_set_selection_in_style (GimpDisplayShell *shell,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_vectors_bg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
gboolean active)
|
||||
gimp_canvas_set_vectors_bg_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (GTK_IS_WIDGET (canvas));
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
||||
cairo_set_line_width (cr, 3.0);
|
||||
|
@ -274,11 +273,11 @@ gimp_display_shell_set_vectors_bg_style (GimpDisplayShell *shell,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_vectors_fg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
gboolean active)
|
||||
gimp_canvas_set_vectors_fg_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (GTK_IS_WIDGET (canvas));
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
|
@ -290,10 +289,10 @@ gimp_display_shell_set_vectors_fg_style (GimpDisplayShell *shell,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_outline_bg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr)
|
||||
gimp_canvas_set_outline_bg_style (GtkWidget *canvas,
|
||||
cairo_t *cr)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (GTK_IS_WIDGET (canvas));
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
|
@ -301,12 +300,12 @@ gimp_display_shell_set_outline_bg_style (GimpDisplayShell *shell,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_outline_fg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr)
|
||||
gimp_canvas_set_outline_fg_style (GtkWidget *canvas,
|
||||
cairo_t *cr)
|
||||
{
|
||||
static const double dashes[] = { 4.0, 4.0 };
|
||||
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (GTK_IS_WIDGET (canvas));
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
||||
cairo_set_line_width (cr, 1.0);
|
||||
|
@ -315,20 +314,20 @@ gimp_display_shell_set_outline_fg_style (GimpDisplayShell *shell,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_passe_partout_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr)
|
||||
gimp_canvas_set_passe_partout_style (GtkWidget *canvas,
|
||||
cairo_t *cr)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (GTK_IS_WIDGET (canvas));
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
||||
gimp_cairo_set_source_rgba (cr, &passe_partout);
|
||||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_tool_bg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr)
|
||||
gimp_canvas_set_tool_bg_style (GtkWidget *canvas,
|
||||
cairo_t *cr)
|
||||
{
|
||||
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
|
||||
g_return_if_fail (GTK_IS_WIDGET (canvas));
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
||||
cairo_set_line_width (cr, 3.0);
|
||||
|
@ -338,9 +337,9 @@ gimp_display_shell_set_tool_bg_style (GimpDisplayShell *shell,
|
|||
}
|
||||
|
||||
void
|
||||
gimp_display_shell_set_tool_fg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
gboolean highlight)
|
||||
gimp_canvas_set_tool_fg_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean highlight)
|
||||
{
|
||||
g_return_if_fail (cr != NULL);
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpdisplayshell-style.h
|
||||
* Copyright (C) 2010 Michael Natterer <mitch@gimp.org>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_CANVAS_STYLE_H__
|
||||
#define __GIMP_CANVAS_STYLE_H__
|
||||
|
||||
|
||||
void gimp_canvas_set_guide_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active);
|
||||
void gimp_canvas_set_sample_point_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active);
|
||||
void gimp_canvas_set_grid_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
GimpGrid *grid);
|
||||
void gimp_canvas_set_pen_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
const GimpRGB *color,
|
||||
gint width);
|
||||
void gimp_canvas_set_layer_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
GimpLayer *layer);
|
||||
void gimp_canvas_set_selection_out_style (GtkWidget *canvas,
|
||||
cairo_t *cr);
|
||||
void gimp_canvas_set_selection_in_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gint index);
|
||||
void gimp_canvas_set_vectors_bg_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active);
|
||||
void gimp_canvas_set_vectors_fg_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean active);
|
||||
void gimp_canvas_set_outline_bg_style (GtkWidget *canvas,
|
||||
cairo_t *cr);
|
||||
void gimp_canvas_set_outline_fg_style (GtkWidget *canvas,
|
||||
cairo_t *cr);
|
||||
void gimp_canvas_set_passe_partout_style (GtkWidget *canvas,
|
||||
cairo_t *cr);
|
||||
|
||||
void gimp_canvas_set_tool_bg_style (GtkWidget *canvas,
|
||||
cairo_t *cr);
|
||||
void gimp_canvas_set_tool_fg_style (GtkWidget *canvas,
|
||||
cairo_t *cr,
|
||||
gboolean highlight);
|
||||
|
||||
|
||||
#endif /* __GIMP_CANVAS_STYLE_H__ */
|
|
@ -32,9 +32,9 @@
|
|||
#include "core/gimpgrid.h"
|
||||
#include "core/gimpimage.h"
|
||||
|
||||
#include "gimpcanvas-style.h"
|
||||
#include "gimpcanvasgrid.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpdisplayshell-style.h"
|
||||
|
||||
|
||||
enum
|
||||
|
@ -382,7 +382,8 @@ gimp_canvas_grid_stroke (GimpCanvasItem *item,
|
|||
if (private->grid_style)
|
||||
{
|
||||
cairo_translate (cr, -shell->offset_x, -shell->offset_y);
|
||||
gimp_display_shell_set_grid_style (shell, cr, private->grid);
|
||||
gimp_canvas_set_grid_style (gimp_canvas_item_get_canvas (item), cr,
|
||||
private->grid);
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -28,9 +28,9 @@
|
|||
|
||||
#include "display-types.h"
|
||||
|
||||
#include "gimpcanvas-style.h"
|
||||
#include "gimpcanvasguide.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpdisplayshell-style.h"
|
||||
|
||||
|
||||
enum
|
||||
|
@ -253,8 +253,8 @@ gimp_canvas_guide_stroke (GimpCanvasItem *item,
|
|||
if (private->guide_style)
|
||||
{
|
||||
cairo_translate (cr, -shell->offset_x, -shell->offset_y);
|
||||
gimp_display_shell_set_guide_style (shell, cr,
|
||||
gimp_canvas_item_get_highlight (item));
|
||||
gimp_canvas_set_guide_style (gimp_canvas_item_get_canvas (item), cr,
|
||||
gimp_canvas_item_get_highlight (item));
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -29,10 +29,10 @@
|
|||
|
||||
#include "core/gimpmarshal.h"
|
||||
|
||||
#include "gimpcanvas-style.h"
|
||||
#include "gimpcanvasitem.h"
|
||||
#include "gimpdisplay.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpdisplayshell-style.h"
|
||||
#include "gimpdisplayshell-transform.h"
|
||||
|
||||
|
||||
|
@ -302,10 +302,11 @@ gimp_canvas_item_real_stroke (GimpCanvasItem *item,
|
|||
|
||||
cairo_set_line_cap (cr, private->line_cap);
|
||||
|
||||
gimp_display_shell_set_tool_bg_style (shell, cr);
|
||||
gimp_canvas_set_tool_bg_style (gimp_canvas_item_get_canvas (item), cr);
|
||||
cairo_stroke_preserve (cr);
|
||||
|
||||
gimp_display_shell_set_tool_fg_style (shell, cr, private->highlight);
|
||||
gimp_canvas_set_tool_fg_style (gimp_canvas_item_get_canvas (item), cr,
|
||||
private->highlight);
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
|
||||
|
@ -316,11 +317,12 @@ gimp_canvas_item_real_fill (GimpCanvasItem *item,
|
|||
{
|
||||
GimpCanvasItemPrivate *private = GET_PRIVATE (item);
|
||||
|
||||
gimp_display_shell_set_tool_bg_style (shell, cr);
|
||||
gimp_canvas_set_tool_bg_style (gimp_canvas_item_get_canvas (item), cr);
|
||||
cairo_set_line_width (cr, 2.0);
|
||||
cairo_stroke_preserve (cr);
|
||||
|
||||
gimp_display_shell_set_tool_fg_style (shell, cr, private->highlight);
|
||||
gimp_canvas_set_tool_fg_style (gimp_canvas_item_get_canvas (item), cr,
|
||||
private->highlight);
|
||||
cairo_fill (cr);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,10 +32,9 @@
|
|||
#include "core/gimplayer.h"
|
||||
#include "core/gimplayer-floating-sel.h"
|
||||
|
||||
#include "gimpcanvas.h"
|
||||
#include "gimpcanvas-style.h"
|
||||
#include "gimpcanvaslayerboundary.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpdisplayshell-style.h"
|
||||
|
||||
|
||||
enum
|
||||
|
@ -194,7 +193,8 @@ gimp_canvas_layer_boundary_stroke (GimpCanvasItem *item,
|
|||
GimpCanvasLayerBoundaryPrivate *private = GET_PRIVATE (item);
|
||||
|
||||
cairo_translate (cr, -shell->offset_x, -shell->offset_y);
|
||||
gimp_display_shell_set_layer_style (shell, cr, private->layer);
|
||||
gimp_canvas_set_layer_style (gimp_canvas_item_get_canvas (item), cr,
|
||||
private->layer);
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
|
||||
|
|
|
@ -25,11 +25,10 @@
|
|||
|
||||
#include "display-types.h"
|
||||
|
||||
#include "gimpcanvas.h"
|
||||
#include "gimpcanvas-style.h"
|
||||
#include "gimpcanvaspassepartout.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpdisplayshell-draw.h"
|
||||
#include "gimpdisplayshell-style.h"
|
||||
|
||||
|
||||
/* local function prototypes */
|
||||
|
@ -112,7 +111,7 @@ gimp_canvas_passe_partout_fill (GimpCanvasItem *item,
|
|||
cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);
|
||||
cairo_clip (cr);
|
||||
|
||||
gimp_display_shell_set_passe_partout_style (shell, cr);
|
||||
gimp_canvas_set_passe_partout_style (gimp_canvas_item_get_canvas (item), cr);
|
||||
cairo_paint (cr);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,9 +31,9 @@
|
|||
#include "core/gimpbezierdesc.h"
|
||||
#include "core/gimpparamspecs.h"
|
||||
|
||||
#include "gimpcanvas-style.h"
|
||||
#include "gimpcanvaspath.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpdisplayshell-style.h"
|
||||
|
||||
|
||||
enum
|
||||
|
@ -298,6 +298,7 @@ gimp_canvas_path_stroke (GimpCanvasItem *item,
|
|||
cairo_t *cr)
|
||||
{
|
||||
GimpCanvasPathPrivate *private = GET_PRIVATE (item);
|
||||
GtkWidget *canvas = gimp_canvas_item_get_canvas (item);
|
||||
gboolean active;
|
||||
|
||||
switch (private->path_style)
|
||||
|
@ -305,18 +306,18 @@ gimp_canvas_path_stroke (GimpCanvasItem *item,
|
|||
case GIMP_PATH_STYLE_VECTORS:
|
||||
active = gimp_canvas_item_get_highlight (item);
|
||||
|
||||
gimp_display_shell_set_vectors_bg_style (shell, cr, active);
|
||||
gimp_canvas_set_vectors_bg_style (canvas, cr, active);
|
||||
cairo_stroke_preserve (cr);
|
||||
|
||||
gimp_display_shell_set_vectors_fg_style (shell, cr, active);
|
||||
gimp_canvas_set_vectors_fg_style (canvas, cr, active);
|
||||
cairo_stroke (cr);
|
||||
break;
|
||||
|
||||
case GIMP_PATH_STYLE_OUTLINE:
|
||||
gimp_display_shell_set_outline_bg_style (shell, cr);
|
||||
gimp_canvas_set_outline_bg_style (canvas, cr);
|
||||
cairo_stroke_preserve (cr);
|
||||
|
||||
gimp_display_shell_set_outline_fg_style (shell, cr);
|
||||
gimp_canvas_set_outline_fg_style (canvas, cr);
|
||||
cairo_stroke (cr);
|
||||
break;
|
||||
|
||||
|
|
|
@ -32,9 +32,9 @@
|
|||
#include "core/gimpcontext.h"
|
||||
#include "core/gimpparamspecs.h"
|
||||
|
||||
#include "gimpcanvas-style.h"
|
||||
#include "gimpcanvaspen.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpdisplayshell-style.h"
|
||||
|
||||
|
||||
enum
|
||||
|
@ -191,7 +191,8 @@ gimp_canvas_pen_stroke (GimpCanvasItem *item,
|
|||
{
|
||||
GimpCanvasPenPrivate *private = GET_PRIVATE (item);
|
||||
|
||||
gimp_display_shell_set_pen_style (shell, cr, &private->color, private->width);
|
||||
gimp_canvas_set_pen_style (gimp_canvas_item_get_canvas (item), cr,
|
||||
&private->color, private->width);
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
|
||||
|
|
|
@ -31,10 +31,10 @@
|
|||
#include "core/gimpprogress.h"
|
||||
|
||||
#include "gimpcanvas.h"
|
||||
#include "gimpcanvas-style.h"
|
||||
#include "gimpcanvasitem-utils.h"
|
||||
#include "gimpcanvasprogress.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpdisplayshell-style.h"
|
||||
|
||||
|
||||
#define BORDER 5
|
||||
|
@ -294,7 +294,7 @@ gimp_canvas_progress_draw (GimpCanvasItem *item,
|
|||
gimp_canvas_get_layout (GIMP_CANVAS (canvas),
|
||||
"%s", private->text));
|
||||
|
||||
gimp_display_shell_set_tool_bg_style (shell, cr);
|
||||
gimp_canvas_set_tool_bg_style (gimp_canvas_item_get_canvas (item), cr);
|
||||
cairo_arc (cr, x + BORDER + RADIUS, y + height - BORDER - RADIUS,
|
||||
RADIUS, - G_PI / 2.0, 2 * G_PI - G_PI / 2.0);
|
||||
cairo_fill (cr);
|
||||
|
|
|
@ -31,7 +31,6 @@
|
|||
#include "gimpcanvas.h"
|
||||
#include "gimpcanvasproxygroup.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpdisplayshell-style.h"
|
||||
|
||||
|
||||
enum
|
||||
|
|
|
@ -29,9 +29,9 @@
|
|||
#include "display-types.h"
|
||||
|
||||
#include "gimpcanvas.h"
|
||||
#include "gimpcanvas-style.h"
|
||||
#include "gimpcanvassamplepoint.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
#include "gimpdisplayshell-style.h"
|
||||
|
||||
|
||||
#define GIMP_SAMPLE_POINT_DRAW_SIZE 10
|
||||
|
@ -291,8 +291,8 @@ gimp_canvas_sample_point_stroke (GimpCanvasItem *item,
|
|||
|
||||
if (private->sample_point_style)
|
||||
{
|
||||
gimp_display_shell_set_sample_point_style (shell, cr,
|
||||
gimp_canvas_item_get_highlight (item));
|
||||
gimp_canvas_set_sample_point_style (gimp_canvas_item_get_canvas (item), cr,
|
||||
gimp_canvas_item_get_highlight (item));
|
||||
cairo_stroke (cr);
|
||||
}
|
||||
else
|
||||
|
@ -310,8 +310,8 @@ gimp_canvas_sample_point_fill (GimpCanvasItem *item,
|
|||
|
||||
if (private->sample_point_style)
|
||||
{
|
||||
gimp_display_shell_set_sample_point_style (shell, cr,
|
||||
gimp_canvas_item_get_highlight (item));
|
||||
gimp_canvas_set_sample_point_style (gimp_canvas_item_get_canvas (item), cr,
|
||||
gimp_canvas_item_get_highlight (item));
|
||||
cairo_fill (cr);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "core/gimpimage.h"
|
||||
|
||||
#include "gimpcanvas.h"
|
||||
#include "gimpcanvas-style.h"
|
||||
#include "gimpcanvaspath.h"
|
||||
#include "gimpdisplay.h"
|
||||
#include "gimpdisplayshell.h"
|
||||
|
@ -39,7 +40,6 @@
|
|||
#include "gimpdisplayshell-render.h"
|
||||
#include "gimpdisplayshell-scale.h"
|
||||
#include "gimpdisplayshell-scroll.h"
|
||||
#include "gimpdisplayshell-style.h"
|
||||
#include "gimpdisplayshell-transform.h"
|
||||
#include "gimpdisplayxfer.h"
|
||||
|
||||
|
@ -108,7 +108,7 @@ gimp_display_shell_draw_selection_out (GimpDisplayShell *shell,
|
|||
g_return_if_fail (cr != NULL);
|
||||
g_return_if_fail (segs != NULL && n_segs > 0);
|
||||
|
||||
gimp_display_shell_set_selection_out_style (shell, cr);
|
||||
gimp_canvas_set_selection_out_style (shell->canvas, cr);
|
||||
|
||||
gimp_cairo_add_segments (cr, segs, n_segs);
|
||||
cairo_stroke (cr);
|
||||
|
@ -124,7 +124,7 @@ gimp_display_shell_draw_selection_in (GimpDisplayShell *shell,
|
|||
g_return_if_fail (cr != NULL);
|
||||
g_return_if_fail (mask != NULL);
|
||||
|
||||
gimp_display_shell_set_selection_in_style (shell, cr, index);
|
||||
gimp_canvas_set_selection_in_style (shell->canvas, cr, index);
|
||||
|
||||
cairo_mask (cr, mask);
|
||||
}
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
/* GIMP - The GNU Image Manipulation Program
|
||||
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
*
|
||||
* gimpdisplayshell-style.h
|
||||
* Copyright (C) 2010 Michael Natterer <mitch@gimp.org>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifndef __GIMP_DISPLAY_SHELL_STYLE_H__
|
||||
#define __GIMP_DISPLAY_SHELL_STYLE_H__
|
||||
|
||||
|
||||
void gimp_display_shell_set_guide_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
gboolean active);
|
||||
void gimp_display_shell_set_sample_point_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
gboolean active);
|
||||
void gimp_display_shell_set_grid_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
GimpGrid *grid);
|
||||
void gimp_display_shell_set_pen_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
const GimpRGB *color,
|
||||
gint width);
|
||||
void gimp_display_shell_set_layer_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
GimpLayer *layer);
|
||||
void gimp_display_shell_set_selection_out_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr);
|
||||
void gimp_display_shell_set_selection_in_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
gint index);
|
||||
void gimp_display_shell_set_vectors_bg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
gboolean active);
|
||||
void gimp_display_shell_set_vectors_fg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
gboolean active);
|
||||
void gimp_display_shell_set_outline_bg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr);
|
||||
void gimp_display_shell_set_outline_fg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr);
|
||||
void gimp_display_shell_set_passe_partout_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr);
|
||||
|
||||
void gimp_display_shell_set_tool_bg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr);
|
||||
void gimp_display_shell_set_tool_fg_style (GimpDisplayShell *shell,
|
||||
cairo_t *cr,
|
||||
gboolean highlight);
|
||||
|
||||
|
||||
#endif /* __GIMP_DISPLAY_SHELL_STYLE_H__ */
|
|
@ -34,7 +34,6 @@
|
|||
#include "display/gimpdisplayshell.h"
|
||||
#include "display/gimpdisplayshell-items.h"
|
||||
#include "display/gimpdisplayshell-transform.h"
|
||||
#include "display/gimpdisplayshell-style.h"
|
||||
|
||||
#include "gimptool.h"
|
||||
#include "gimptool-progress.h"
|
||||
|
|
Loading…
Reference in New Issue