Commit Graph

12 Commits

Author SHA1 Message Date
Benjamin Otte
79d2d0e40d snapshot: Add gtk_snapshot_render_background()
and gtk_snapshot_render_frame() to be direct replacements for the
old gtk_render_*() functions.

Use them to replace Cairo usage completely in gtk_window_snapshot().
2016-11-15 17:48:45 +01:00
Benjamin Otte
e4a485dca2 renderborder: Add API to query the outline clip
And use it in implementation of gadgets.
2016-02-21 01:02:51 +01:00
Benjamin Otte
e2d966eda5 cssnumbervalue: Remove gtk_css_number_value_get_unit()
This is in preparation for calc(), as calc(50% - 5px) is valid CSS
but has 2 units. Instead, add a function to query a value's dimension
(so we can differentiate lengths from numbers) and add a function to
query if the value contains percentages.
2016-02-13 04:49:07 +01:00
Matthias Clasen
0ddc1eed19 Fix rendering of unsymmetric borders
There was an errant path that threw off our clipping for
the top section of the border.

https://bugzilla.gnome.org/show_bug.cgi?id=722937
2016-01-09 23:44:43 -05:00
Matthias Clasen
caaf537f94 Avoid division by 0 in the border rendering code
We skip sides with 0 border width in render_border, but when
we collect sides with the same style, we may pass the 0 width
down to render_frame_stroke anyway. So skip width 0 sides
there as well.
2016-01-09 23:44:43 -05:00
Matthias Clasen
12bc8ddb93 Fix dobule border rendering
This is the same fix that was applied for ridge and groove
style in 9f27ee7f5a.
2016-01-09 14:37:04 -05:00
Benjamin Otte
42fdfb6af4 renderborder: Actually draw the path as one element
Avoids spurious lines that can sometimes be seen going towards the
center of the widget.
2015-12-16 05:15:04 +01:00
Cosimo Cecchi
9ba94849e8 GtkRenderBorder: make one function static 2015-11-21 14:55:13 -08:00
Benjamin Otte
9f27ee7f5a render: Fix ridge/groove border rendering
The typo strikes again!
2015-06-23 22:33:40 +02:00
Benjamin Otte
ba06066158 border: Don't special case according to border styles
This is now done (as it should) in the compute code.
2015-01-21 16:22:30 +01:00
Benjamin Otte
8b6d419e02 render: Move border rendering into its own file
gtkrenderborder.c now contains the implementation for
  gtk_css_style_render_border
  gtk_css_style_render_outline
2015-01-20 06:30:19 +01:00
Benjamin Otte
717877dff2 render: Rename gtkborderimage.[ch]
I want the gtkrender prefix for all filenames about rendering.
2015-01-20 06:30:18 +01:00