summaryrefslogtreecommitdiff
path: root/src/static_libs
diff options
context:
space:
mode:
authorVitalii Vorobiov <vi.vorobiov@samsung.com>2017-02-17 17:00:01 +0200
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-07 11:54:09 +0900
commit405e56ac553db21f3e53d1702cc3db3863142811 (patch)
treec6ac76c18686aa95ce975234d8bb7946f4dc9e2a /src/static_libs
parent6139aa78d5a48166a235087ecc49942b969b09af (diff)
svg_parse: parse linear gradient variables accroding to gradientUnits
There are difficult cases according to https://www.w3.org/TR/2000/CR-SVG-20000802/pservers.html
Diffstat (limited to 'src/static_libs')
-rw-r--r--src/static_libs/vg_common/vg_common.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/static_libs/vg_common/vg_common.h b/src/static_libs/vg_common/vg_common.h
index 65c70a8..174cb20 100644
--- a/src/static_libs/vg_common/vg_common.h
+++ b/src/static_libs/vg_common/vg_common.h
@@ -176,6 +176,25 @@ struct _Svg_Radial_Gradient
176 double r; 176 double r;
177}; 177};
178 178
179/**
180 * IMPORTANT!
181 * Talking about parsing gradient variables
182 *
183 * All variables (like x1,x2,y1,y2,fx,fy,rx,ry,r, etc) would be percentages
184 * and then all recalculations would be done after that if userSpaceOnUse
185 * is set or not (recalculation depends on that).
186 *
187 * If gradientUnits="userSpaceOnUse" (grad->user_space is set to true)
188 * > Gradient variables (x1,x2,r,fx etc) contains percentages of entire cavas
189 * > size.
190 *
191 * If gradientUnits="objectBoundingBox" (grad->user_space is set to false)
192 * > Gradient variables (x1,x2,r,fx etc) contain percentages of 'whatever'
193 * > figure.
194 *
195 * So later on, while using gradient, please be careful and
196 * check user_space to use and transform sizes correctly.
197 */
179struct _Svg_Style_Gradient 198struct _Svg_Style_Gradient
180{ 199{
181 Svg_Gradient_Type type; 200 Svg_Gradient_Type type;