Michael Natterer
1f8a835e40
app: fix GimpCanvasBoundary's extents
2010-09-29 23:24:01 +02:00
Mukund Sivaraman
c83294f4ce
Minor coding style fix
2010-09-30 01:56:02 +05:30
Michael Natterer
fe5b6eddc0
app: indentation
2010-09-29 22:20:02 +02:00
Michael Natterer
7edfa2ca54
app: start an infrastructure where the shell keeps around its canvas items
...
- Invalidate the proper area when an item gets added or removed.
- Draw the kept canvas items instead of calling a draw tool function.
- The draw tool now sets its item on the shell.
2010-09-29 22:12:01 +02:00
Michael Natterer
81cfb44047
app: use a GimpColorPanel not a GimpColorButton in the text style editor
...
so we get proper color previews in the popup menu.
2010-09-29 21:14:51 +02:00
Michael Natterer
42e137fc74
app: rename gimp_display_shell_draw_area() to draw_image()
2010-09-29 20:58:13 +02:00
Sven Neumann
2ef259cd20
app: use GimpRGB as mask color
...
Instead of passing GimpChannelType as mask color to
gimp_display_shell_set_mask(), change that function to accept a
GimpRGB color.
Adapt GimpForegroundSelectTool, the only user of the display mask
feature, to this change.
2010-09-29 20:35:00 +02:00
Sven Neumann
a7413bd784
app/display: implement drawing of selection mask
...
Use cairo_mask_surface() to render the selection mask (as used by
the foreground selection tool).
2010-09-29 20:35:00 +02:00
Sven Neumann
1eb77f6360
app/display: refactor RenderInfo code
2010-09-29 20:34:59 +02:00
Sven Neumann
375567df6f
app/display: sprinkle render code with const qualifiers
2010-09-29 20:34:59 +02:00
Sven Neumann
b3182be59c
app/display: remove obsolete includes
2010-09-29 20:34:59 +02:00
Sven Neumann
260c8560e4
app: remove gimp_display_shell_render_{init,exit}
...
The functions had become mostly obsolete and we can just use a
static scratch buffer for rendering.
2010-09-29 20:34:59 +02:00
Sven Neumann
d5d5f4fb3f
app/display: adjust a comment to reflect the current state of the code
2010-09-29 20:34:59 +02:00
Sven Neumann
dd1e858921
app/display: introduce a style for dimming
2010-09-29 20:34:59 +02:00
Sven Neumann
eb5bb6363e
app/display: draw the crop highlight using cairo
...
Instead of dimming the actual pixels, apply a translucent fill to
the area outside the highlight rectangle.
2010-09-29 20:34:59 +02:00
Sven Neumann
ccee0ec41a
app/display: let cairo render the checkerboard
...
Instead of blending the scaled image data onto the checkerboard and
then painting this image to the screen, render the image data into
an ARGB cairo image surface. Then paint a checkerboard on the canvas
and the image on top of it.
2010-09-29 20:34:59 +02:00
Michael Natterer
ebeb933350
app: add gimp_display_shell_expose_item() and use it in the draw tool
2010-09-29 20:10:21 +02:00
Michael Natterer
7367ec1b7c
app: fix the extents of filled rectangles and invalidate less pixels
...
for large unfilled ones: if larger than 64x64 (arbitrary), invalidate
only the actual lines.
2010-09-29 19:58:59 +02:00
Mukund Sivaraman
5dfb2782dd
Use libapp_generated_sources in Makefile.am
2010-09-29 00:39:23 +05:30
Nils Philippsen
6b1aabfa71
add git-version.h to BUILT_SOURCES
...
This is so that it gets built before automake descends into subdirs.
2010-09-28 18:19:34 +02:00
Nils Philippsen
c9b03ef8ff
app: use last git commit year for copyright label
2010-09-28 15:07:45 +02:00
Nils Philippsen
37d9876742
app: define GIMP_GIT_LAST_COMMIT_{TIMESTAMP,YEAR} macros
2010-09-28 14:25:43 +02:00
Michael Natterer
e869e83f56
app: add the text tool's selection rectangles to a filling group
...
Doesn't look any better but is a step in the right direction.
2010-09-27 23:04:18 +02:00
Michael Natterer
d7cb20b0d5
app: add group filling support to GimpCanvasItem and GimpCanvasGroup
...
The code is almost identical to the group stroking feature.
2010-09-27 22:59:36 +02:00
Michael Natterer
3f2641c4be
app: put the bounding box lines into a stroking group
2010-09-27 19:32:25 +02:00
Ville Pätsi
50a34c230a
app: Changed tool display colors and opacities
2010-09-27 20:08:49 +03:00
Sven Neumann
8d93dfa923
app: remove xor-color property from gimprc
2010-09-26 23:21:40 +02:00
Michael Natterer
7db14ffca9
app: remove gimp_display_shell_transform_coords()
2010-09-26 23:09:23 +02:00
Michael Natterer
3b7999a218
app: remove gimp_display_shell_transform_points()
2010-09-26 23:06:35 +02:00
Sven Neumann
74885082ee
app/base: formatting
2010-09-26 23:03:16 +02:00
Michael Natterer
7ed79e9fe1
app: fix off-by-0.5 in boundary drawing
...
which doesn't seem to have any visual effect...
2010-09-26 23:00:23 +02:00
Michael Natterer
06da10bc08
app: change boundary drawing by tools to work like the selection
...
- GimpCanvasBoundary takes unsorted BoundSeg arrays now and uses
gimp_display_shell_transform_boundary() and gimp_cairo_add_boundary().
- Nobody calls boundary_sort() any longer for the purpose of displaying
a boundary.
- gimp_display_shell_transform_boundary() got offset parameters
so it can transform things that are not in the image's coordinate
system.
2010-09-26 22:41:04 +02:00
Michael Natterer
8f9ec0650f
app: move code from GtkObject::destroy() to GObject::dispose()
2010-09-26 22:38:01 +02:00
Michael Natterer
0e17e44ba4
app: move code from GtkObject::destroy() to GObject::dispose()
2010-09-26 22:35:49 +02:00
Michael Natterer
4492725110
app: add some (disabled) code that draws the untransformed brush outline
2010-09-26 22:27:55 +02:00
Sven Neumann
1d17042efb
app/display: don't evaluate alpha value several times
...
The GIMP_CAIRO_ARGB32_SET_PIXEL() macro will evaluate the alpha
parameter multiple times, so we better calculate alpha beforehand.
2010-09-26 22:25:49 +02:00
Sven Neumann
2f3c6af28b
app/display: fix cairo drawing of transform tool image preview
...
Don't access the cairo image surface directly, instead use the
GIMP_CAIRO_ARGB32_SET_PIXEL() macro that takes care of
pre-multiplying the colors by the pixels alpha component.
2010-09-26 22:15:07 +02:00
Michael Natterer
c3102bde81
app: move the GimpCanvasGroup typedef to display-types.h
2010-09-26 19:20:14 +02:00
Michael Natterer
ffd57307c8
app: put the transform tool's grid and boundary into a stroke group
2010-09-26 18:44:40 +02:00
Michael Natterer
b0a22bc285
app: change the default item line cap to round
...
but add and API to configure it and set it to suare for handles which
are always axis-aligned.
2010-09-26 17:40:10 +02:00
Michael Natterer
6ec1729035
app: add the handle that is being dragged to the stroke group too
2010-09-26 17:13:53 +02:00
Michael Natterer
f284e5f748
app: don't draw the draw tool's items to the wrong display
2010-09-26 16:56:26 +02:00
Michael Natterer
9cce1b894b
app: put a lot of rectangle tool lines into a stroke groups
...
so they don't overlap.
2010-09-26 16:17:05 +02:00
Michael Natterer
e0f35d8979
app: put the lines and the angle arc into a stroke group
...
This looks much better, and makes the lines appear under the handles
as a nice side effect.
2010-09-26 15:49:10 +02:00
Michael Natterer
a306a46d45
app: make the code that puts the lines into a stroke group nicer
...
This much lesss feels like we need new API, let's see...
2010-09-26 15:43:59 +02:00
Michael Natterer
4b89850a2e
app: draw the free select tool's line in one stroke()
...
This is clearly too complicated for general use, but it's only a test
case for the new APIs.
2010-09-26 14:17:04 +02:00
Michael Natterer
b173707c84
app: add gimp_draw_tool_remove_item()
2010-09-26 14:15:47 +02:00
Michael Natterer
e6ce564de4
app: add an infrastructure that allows to stroke multiple items at once
...
In order to avoid visually overlapping lines:
- GimpCanvasItem got a "suspend_stroking" API that allows to skip
stroking and instead starts a new sub-path
- GimpCanvasGroup got a "group_stroking" API that sets suspend_stroking
on all its children and does one stroke after calling all items'
draw().
2010-09-26 14:12:54 +02:00
Martin Nordholts
ea5190e630
app/tests: Fix gimp_display_shell_transform_xy() build
2010-09-26 12:47:24 +02:00
Michael Natterer
970a062b01
app: argh! never add even only one line of code without testing...
2010-09-26 00:30:09 +02:00