Commit Graph

431 Commits

Author SHA1 Message Date
e76f7174fc Bug 761270 - layer boundary not re-drawn correctly on scrolling
Pass the display scroll offset down to gimp_cairo_stipple_pattern_create()
and set it as offset on the created cairo pattern, so stipple patterns
look the same no matter how the display is scrolled.
2016-03-26 22:50:10 +01:00
051a3e4af4 Bug 681968 - Disabling 'Dot for Dot' glitches display
Enhance the existing but unused display scaling (hidpi/retina) support
to work independently in x and y direction, and adjust the scaling
factors accordingly when dot-for-dot is off and xres != yres.

Increase GIMP_DISPLAY_RENDER_MAX_SCALE from 2.0 to 4.0 and adjust the
rendering chunk size dynamically so we never render chunks that do
not fit into the GimpDisplayXfer buffers.
2014-04-20 22:01:57 +02:00
37d589335f app: consolidate all transform API in gimpdisplayshell-transform.[ch]
Added complete API for zoom/unzoom (scale and scroll) and
rotate/unrotate, with the same set of functions as the existing
transform/untransform. Moved some special case functions to the
namespaces they belong.
2013-04-25 00:29:58 +02:00
b3a9a6a3e3 Bug 55367 - Rotated view of the canvas (view is rotated, not image contents)
First version of display rotation, inspired by gimp-painter.
The rotation always happens around the image's center.

The only "UI" for rotating is currently shift+middle-drag and
shift+space-drag. Control constrains the angle to 15 degrees
and is currently the only way to go back to "no rotation".
2013-04-20 15:11:01 +02:00
057ec9ac4a app: remove rectangle parameters from gimp_display_shell_draw_checkerboard()
because the cairo_t is already clipped to the right extents.
2013-04-20 10:47:13 +02:00
c3b53b8b66 app: move the "get scaled image size" functions from shell-draw to -scale 2013-04-18 19:06:17 +02:00
52b92e740f 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.
2013-04-18 16:46:01 +02:00
dc514dd967 app: no need to ask the projection's buffer for its size
when we have the image, they are always exactly the same.
2013-04-18 16:46:00 +02:00
fd6c5dd576 app: port the image and wilber drawing code away from GdkRegion
the changes are simply copied from the gtk3-port branch, reducing the
number of diffs, and enabling hacking on drawing stuff in master while
keeping the branch easily rebasable.
2013-04-18 11:56:43 +02:00
b8e96c7141 app: rename gimpdisplay-transport.[ch] to gimpdisplayxfer.[ch]
so it matches the name of the stuff it implements.
2013-02-03 13:26:32 +01:00
d0a5879f28 app: some GIMP-style cleanup to the last commit 2013-02-02 17:07:03 +01:00
373a4e7469 app: completely remove TileManager and friends (base/ and paint-funcs/)
And along with it a lot of stuff like the drawable preview cache, the
gegl tile manager backend, temporary gimp_gegl_buffer_foo() stuff, and
the remaining bits of performance.

The projection is in an evil semi-ported state which makes it work
ok-ish for stuff like layer moving, but absolutely unbearable for
painting, there is also an off-by-one rendering glitch at some zoom
levels.
2012-06-20 21:44:09 +02:00
53cf2c657b app: move the GTK-free cairo utility functions to core/gimp-cairo.[ch] 2012-05-02 17:51:02 +02:00
f084704fbd app: ask the buffer not the tile manager for its size 2012-05-02 17:46:15 +02:00
bea8b93959 app: use projection and not image sizes
these are the same nearly always, but during
an image-scale, the image size is updated early
and expose redraw following dialog destruction
uses the projection before the scale.

Basically this patch partly restores the code
before commit 8b8e67ffe2
2011-12-11 17:11:25 +01:00
8b8e67ffe2 Bug 656129: Warnings: render_image_tile_fault: assertion `tile[4]... 2011-09-08 18:37:28 +02:00
458230bf8d app: use a GimpCanvasPassePartout for drawing the crop highlight
and remove all old drawing logic.
2010-11-12 19:47:51 +01:00
a798c9456c app/display: add new canvas item GimpCanvasPassePartout
This is supposed to replace the GimpDisplayShell highlight API,
but it is not yet used.
2010-10-18 22:17:27 +02:00
dc39857238 app: add GimpSegment as replacement for GdkSegment 2010-10-15 12:37:36 +02:00
55f01bf6f3 app: remove gimp_display_shell_draw_vectors()
which is the last bit of non-item drawing of stuff that is not
somehow the image itself... wheee!

This involves reverting commit
6bce0641d4 and adding back all the
vectors handlers that were in gimpdisplayshell-callbacks.c before.
Change the callbacks to manage proxy items for all the image's
vectors.
2010-10-08 01:03:56 +02:00
149ba1ec4b app: add a path canvas item class based on cairo_path_t (GimpBezierDesc)
and use it in gimp_display_shell_draw_vectors().
2010-10-06 23:02:16 +02:00
f3450431a3 app: add a pen canvas item class and use it in the foreground select tool
Remove gimp_display_shell_draw_pen().
2010-10-03 02:26:40 +02:00
3e69ae0039 app: add a layer boundary canvas item class
and use it to draw the layer boundary. Remove a lot of stuff
that was there only to draw the boundary before:

- remvoe all layer boundary stuff from the selection code
- remove gimp_display_shell_draw_layer()
- remove enum values GIMP_SELECTION_LAYER_ON,OFF from core-enums.h
- remove all lines calling gimp_image_selection_control() with
  the removed enum values
- remove gimp_layer_boundary()
2010-10-03 00:28:40 +02:00
7ffa463273 app: remove obsolete includes 2010-10-02 22:07:31 +02:00
1d45f6295e app: add a software cursor canvas item
and use it to draw the sw cursor. Almost every aspect of the old code
was ugly and hard to read, this is so much nicer...
2010-10-02 21:56:36 +02:00
502d7c815b app: add a canvas grid item class and use it to draw the grid
Remove gimp_display_shell_draw_grid().
2010-10-02 20:57:40 +02:00
26d0035be0 app: draw guides using GimpCanvasItems
- Add signals GimpImage::guide_added(), removed() and moved()
- Remove singal GimpImage::update_guide()
- Adapt core code to emit the new signals instead of update_guide()
- Have the shell connect to the new signals and update guide canvas
  items as needed
- Remove gimp_display_shell_draw_guides()
2010-10-01 10:34:15 +02:00
0c613ba87d app: port sample point drawing to GimpCanvasItems
- Add GimpImage signal "sample-point-moved" and emit it when needed
- Let the shell connect to the sample point add, remove and move signals
  and update the canvas items accordingly
- Remove gimp_display_shell_draw_sample_points()
2010-10-01 09:27:57 +02:00
cbd1d8cd51 app: remove gimp_display_shell_draw_sample_point()
and draw all sample points in gimp_display_shell_draw_sample_points().
2010-09-30 01:37:28 +02:00
0d11be8fed app: add a canvas sample point item class
and use it in gimp_display_shell_draw_sample_point().
2010-09-30 01:14:23 +02:00
9d36984d37 app: remove the now obsolete gimp_display_shell_draw_guide()
and draw the guides in gimp_display_shell_draw_guides().
2010-09-30 00:23:06 +02:00
5a4bcb8c3d app: use a temporary GimpCanvasGuide to draw guides guides 2010-09-30 00:02:21 +02:00
42e137fc74 app: rename gimp_display_shell_draw_area() to draw_image() 2010-09-29 20:58:13 +02:00
dd1e858921 app/display: introduce a style for dimming 2010-09-29 20:34:59 +02:00
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
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
ddc63de6d6 app: remove "gboolean use_offsets" from gimpdisplayshell-transform.[ch] 2010-09-23 19:24:04 +02:00
cca9257018 app: add functions to set the vectors' cairo style
so all style constants are in one place. Also draw the active path in
red on white instead of black on white.
2010-09-17 22:50:20 +02:00
8e33205b65 app: draw all vectors strokes with one cairo_stroke() 2010-09-17 22:30:43 +02:00
372e7316b7 app: adjust line style for cairo-drawn vectors 2010-09-17 00:12:38 +02:00
a9a20e8c61 app: cleanup of vectors rendering
Respect the visible property of the active vectors object.
2010-09-16 21:51:23 +02:00
5abae32923 app: cache bezier representation in GimpVectors object
Introduce gimp_vectors_get_bezier() which creates the bezier
representation on demand and then caches it for subsequent calls
until the vectors object is frozen.

At some point we should introduce GimpVectors::changed instead
of relying on the fact that a vectors object is always frozen
and thawn whenever it is changed...
2010-09-16 21:36:51 +02:00
5ab83e72ac app: don't let the vectors tool draw the active vectors
Let the display shell deal with drawing the vectors. The vectors
tool only draws the handles on the active vectors object.
2010-09-16 21:13:08 +02:00
4c57e3f19e app: port GimpVectors drawing to cairo
This is just a rough proof of concept. More changes are about
to follow.
2010-09-16 21:13:08 +02:00
22d5dc9752 app: formatting 2010-09-11 21:34:58 +02:00
f0c40d3717 app: port GimpDisplayShell image drawing to cairo 2010-08-27 23:15:25 +02:00
9c63f3d4f1 app: remove gimp_display_shell_draw_selection_segments()
and move its code into selection_render_mask().
2010-08-27 15:03:03 +02:00
f260cd766e app: add gimp_cairo_add_segments()
which adds an array of GdkSegments to the current path, and use it in
gimpdisplayshell-draw.c instead of duplicating the code three times.
2010-08-27 14:58:43 +02:00
be2bd189cd app: completely switch to cairo-drawing the selection
and remove all old selection drawing code. Thanks to Benjamin Otte for
pointing out the right optimization.

Also fixes bug #479875 - performance problem drawing a complex selection.
2010-08-26 20:52:52 +02:00
d745ab3871 app: move the GIMP_CURSOR_SIZE define to a single place in the right header 2010-08-26 19:13:49 +02:00