Commit Graph

15 Commits

Author SHA1 Message Date
Benjamin Otte
8915d60900 roundedrect: Mke sure shrinking borders works
Previously, when borders were too big - ie when a 100x100 rect had only
one 100x100 border, like the black part of ◔ - and then shrinking this
rect by 25px on either side, we'd end up with a 50x50 rect with a 75x75
border, and that's obviously not correct.
2019-05-02 19:35:45 +02:00
Timm Bäder
dc282991c6 roundedrect: Add gsk_rounded_rect_to_string
Keep it private for now, but it's very useful when debugging.
2019-02-28 10:33:18 +01:00
Benjamin Otte
a6079b9b7b gsk: Implement gsk_render_node_diff()
This includes a copy of the diff(1) algorithm used by git diff by Davide
Libenzi.

It's used for the common case ofcontainer nodes having only very few
changes for the few nodes of child widgets that changed (like a button
lighting up when hilighted or a spinning spinner).
2018-04-05 14:56:38 +02:00
Matthias Clasen
4c150d8eb5 The big versioning cleanup
Remove all the old 2.x and 3.x version annotations.
GTK+ 4 is a new start, and from the perspective of a
GTK+ 4 developer all these APIs have been around since
the beginning.
2018-02-06 01:16:32 -05:00
Timm Bäder
5aaf752013 roundedrect: Fix coordinate mixup in contains_point
This together with the optimizations in GtkSnapshot was causing circular
buttons to become squared when partially scrolled out of view.
2018-02-04 14:56:41 +01:00
Matthias Clasen
f6626a9e0e gsk: Documentation additions
Document newly added apis, and ensure that all public apis
are listed in the docs.
2017-09-24 22:26:39 -04:00
Emmanuele Bassi
7ae5b516ac gsk: Mark private symbol as static
The ellipsis_contains_point() function is not used anywhere else.
2017-04-26 17:25:24 +01:00
Timm Bäder
dfcde113e8 GskRoundedRect: Include private header file
So we don't have implementations without previous prototypes.
2017-04-26 11:07:40 +02:00
Daniel Boles
3d11edf1bc GSK: Fix a bunch of warnings from the GIR scanner
arising from conflicting argument names, missing annotations, etc.
2017-03-27 20:22:07 +01:00
Alexander Larsson
2f453cc57e gsk_rounded_rect_init_copy: Don't normalize
This was showing up quite high on the profiles, and there is
no real reason for copy to normalize, as the source is a
GskRoundedRect which should be normalized already unless
you did something very strange (and then you should have normalized
manually).
2017-01-11 09:23:37 +01:00
Benjamin Otte
81c487b841 vulkan: Fold clip into push constants
As a side effect, the clipping data is now available inside shaders.

Not that any shader would use them yet, but they could!
2016-12-24 06:19:16 +01:00
Benjamin Otte
2bca24c455 gsk: Add GskVulkanClip
This is now tracking the clips added by the clip nodes.
If any particular node can't deal with a clip, it falls back to Cairo
rendering. But if it can, it will render it directly.
2016-12-24 06:19:16 +01:00
Benjamin Otte
4fc64ae3dd gsk: Add contains/intersect functions for GskRoundedRect
... and use them.
2016-12-20 18:01:12 +01:00
Benjamin Otte
a9809e5d30 gsk: Add gsk_rounded_rect_shrink()
... and replace _gtk_rounded_box_grow() and _gtk_rounded_box_shrink()
with it.
2016-12-20 18:01:11 +01:00
Benjamin Otte
59d638a09f gsk: Add GskRoundedRect
It's essentially a port of GtkRoundedBox to graphene.
2016-12-20 18:01:10 +01:00