summaryrefslogtreecommitdiffstats
path: root/include/ui
diff options
context:
space:
mode:
authorChris Craik <ccraik@google.com>2013-02-25 19:12:47 -0800
committerChris Craik <ccraik@google.com>2013-02-27 11:13:03 -0800
commit3e010f3138593cc6953039ee0e3db8ee31881296 (patch)
tree3761f1081c57732f4126eb086836c74cb91de44c /include/ui
parent68a029edbbd162f2ca783733df37a44d5082ddee (diff)
downloadframeworks_native-3e010f3138593cc6953039ee0e3db8ee31881296.zip
frameworks_native-3e010f3138593cc6953039ee0e3db8ee31881296.tar.gz
frameworks_native-3e010f3138593cc6953039ee0e3db8ee31881296.tar.bz2
Add createTJunctionFreeRegion
T-junction free regions are useful for rendering regions with various geometric transformations, and the Region's span-ordered, sorted rect list supports T-junction free storage without modification. This approach creates a T-junction free region by splitting each rectangle that is part of a vertical T-junction. This approach is two pass (up and down) so that divisions can trickle up/down to other adjacent spans. Change-Id: Ifcf5e6fe0034c96b00ef09a4433b2b0fce8f4300
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/Region.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/ui/Region.h b/include/ui/Region.h
index 43a4450..ffcd429 100644
--- a/include/ui/Region.h
+++ b/include/ui/Region.h
@@ -39,7 +39,9 @@ public:
Region(const Region& rhs);
explicit Region(const Rect& rhs);
~Region();
-
+
+ static Region createTJunctionFreeRegion(const Region& r);
+
Region& operator = (const Region& rhs);
inline bool isEmpty() const { return getBounds().isEmpty(); }