Re: Re: [SVG] [Batik] Polygon Area
"Gurdev Singh [email protected] [svg-developers]" <[email protected]> Tue, 15 Dec 2015 18:08:48 +0000 (UTC)
| Newsgroups | gmane.text.xml.svg.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello Group,=C2=A0
Here comes the real challenge.=C2=A0What I need is to find the area of path=
element which contain the sub-path segments.For example, in the attached S=
VG file, I need to calculate the area of filled path only.
When I run the API getTotalLength(), it gives me area of closed path in tot=
ality.But I need to exclude the area of closed path with white color.
Is there any way available to calculate the area of=C2=A0SVGPathSeg.PATHSEG=
_CLOSEPATHThis way I will calculate the area of segments and subtract from =
total area.
OR If you please suggest some other way.
Thanks for your supportSingh=20
On Friday, December 4, 2015 9:41 PM, "[email protected] [svg-developer=
s]" <[email protected]> wrote:
=20
=C2=A0 Of course some transforms do have an effect, for example if you s=
kew a polygon its perimeter will change. If you're dealing with these situa=
tions the transformations should be "applied", i.e. the geometrical attribu=
tes (d, points, x1, y1, etc.) should be recalculated. There are libraries f=
or that, for example the Fontello library (https://github.com/fontello/svgp=
ath) applies transformation changes directly to paths.
The viewbox doesn't have an incidence, the measurements in the user space d=
on't change.
Domenico=C2=A0 #yiv1544541413 #yiv1544541413 -- #yiv1544541413ygrp-mkp {bo=
rder:1px solid #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv=
1544541413 #yiv1544541413ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv1544541=
413 #yiv1544541413ygrp-mkp #yiv1544541413hd {color:#628c2a;font-size:85%;fo=
nt-weight:700;line-height:122%;margin:10px 0;}#yiv1544541413 #yiv1544541413=
ygrp-mkp #yiv1544541413ads {margin-bottom:10px;}#yiv1544541413 #yiv15445414=
13ygrp-mkp .yiv1544541413ad {padding:0 0;}#yiv1544541413 #yiv1544541413ygrp=
-mkp .yiv1544541413ad p {margin:0;}#yiv1544541413 #yiv1544541413ygrp-mkp .y=
iv1544541413ad a {color:#0000ff;text-decoration:none;}#yiv1544541413 #yiv15=
44541413ygrp-sponsor #yiv1544541413ygrp-lc {font-family:Arial;}#yiv15445414=
13 #yiv1544541413ygrp-sponsor #yiv1544541413ygrp-lc #yiv1544541413hd {margi=
n:10px 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv1544541413 #=
yiv1544541413ygrp-sponsor #yiv1544541413ygrp-lc .yiv1544541413ad {margin-bo=
ttom:10px;padding:0 0;}#yiv1544541413 #yiv1544541413actions {font-family:Ve=
rdana;font-size:11px;padding:10px 0;}#yiv1544541413 #yiv1544541413activity =
{background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;pad=
ding:10px;}#yiv1544541413 #yiv1544541413activity span {font-weight:700;}#yi=
v1544541413 #yiv1544541413activity span:first-child {text-transform:upperca=
se;}#yiv1544541413 #yiv1544541413activity span a {color:#5085b6;text-decora=
tion:none;}#yiv1544541413 #yiv1544541413activity span span {color:#ff7900;}=
#yiv1544541413 #yiv1544541413activity span .yiv1544541413underline {text-de=
coration:underline;}#yiv1544541413 .yiv1544541413attach {clear:both;display=
:table;font-family:Arial;font-size:12px;padding:10px 0;width:400px;}#yiv154=
4541413 .yiv1544541413attach div a {text-decoration:none;}#yiv1544541413 .y=
iv1544541413attach img {border:none;padding-right:5px;}#yiv1544541413 .yiv1=
544541413attach label {display:block;margin-bottom:5px;}#yiv1544541413 .yiv=
1544541413attach label a {text-decoration:none;}#yiv1544541413 blockquote {=
margin:0 0 0 4px;}#yiv1544541413 .yiv1544541413bold {font-family:Arial;font=
-size:13px;font-weight:700;}#yiv1544541413 .yiv1544541413bold a {text-decor=
ation:none;}#yiv1544541413 dd.yiv1544541413last p a {font-family:Verdana;fo=
nt-weight:700;}#yiv1544541413 dd.yiv1544541413last p span {margin-right:10p=
x;font-family:Verdana;font-weight:700;}#yiv1544541413 dd.yiv1544541413last =
p span.yiv1544541413yshortcuts {margin-right:0;}#yiv1544541413 div.yiv15445=
41413attach-table div div a {text-decoration:none;}#yiv1544541413 div.yiv15=
44541413attach-table {width:400px;}#yiv1544541413 div.yiv1544541413file-tit=
le a, #yiv1544541413 div.yiv1544541413file-title a:active, #yiv1544541413 d=
iv.yiv1544541413file-title a:hover, #yiv1544541413 div.yiv1544541413file-ti=
tle a:visited {text-decoration:none;}#yiv1544541413 div.yiv1544541413photo-=
title a, #yiv1544541413 div.yiv1544541413photo-title a:active, #yiv15445414=
13 div.yiv1544541413photo-title a:hover, #yiv1544541413 div.yiv1544541413ph=
oto-title a:visited {text-decoration:none;}#yiv1544541413 div#yiv1544541413=
ygrp-mlmsg #yiv1544541413ygrp-msg p a span.yiv1544541413yshortcuts {font-fa=
mily:Verdana;font-size:10px;font-weight:normal;}#yiv1544541413 .yiv15445414=
13green {color:#628c2a;}#yiv1544541413 .yiv1544541413MsoNormal {margin:0 0 =
0 0;}#yiv1544541413 o {font-size:0;}#yiv1544541413 #yiv1544541413photos div=
{float:left;width:72px;}#yiv1544541413 #yiv1544541413photos div div {borde=
r:1px solid #666666;height:62px;overflow:hidden;width:62px;}#yiv1544541413 =
#yiv1544541413photos div label {color:#666666;font-size:10px;overflow:hidde=
n;text-align:center;white-space:nowrap;width:64px;}#yiv1544541413 #yiv15445=
41413reco-category {font-size:77%;}#yiv1544541413 #yiv1544541413reco-desc {=
font-size:77%;}#yiv1544541413 .yiv1544541413replbq {margin:4px;}#yiv1544541=
413 #yiv1544541413ygrp-actbar div a:first-child {margin-right:2px;padding-r=
ight:5px;}#yiv1544541413 #yiv1544541413ygrp-mlmsg {font-size:13px;font-fami=
ly:Arial, helvetica, clean, sans-serif;}#yiv1544541413 #yiv1544541413ygrp-m=
lmsg table {font-size:inherit;font:100%;}#yiv1544541413 #yiv1544541413ygrp-=
mlmsg select, #yiv1544541413 input, #yiv1544541413 textarea {font:99% Arial=
, Helvetica, clean, sans-serif;}#yiv1544541413 #yiv1544541413ygrp-mlmsg pre=
, #yiv1544541413 code {font:115% monospace;}#yiv1544541413 #yiv1544541413yg=
rp-mlmsg * {line-height:1.22em;}#yiv1544541413 #yiv1544541413ygrp-mlmsg #yi=
v1544541413logo {padding-bottom:10px;}#yiv1544541413 #yiv1544541413ygrp-msg=
p a {font-family:Verdana;}#yiv1544541413 #yiv1544541413ygrp-msg p#yiv15445=
41413attach-count span {color:#1E66AE;font-weight:700;}#yiv1544541413 #yiv1=
544541413ygrp-reco #yiv1544541413reco-head {color:#ff7900;font-weight:700;}=
#yiv1544541413 #yiv1544541413ygrp-reco {margin-bottom:20px;padding:0px;}#yi=
v1544541413 #yiv1544541413ygrp-sponsor #yiv1544541413ov li a {font-size:130=
%;text-decoration:none;}#yiv1544541413 #yiv1544541413ygrp-sponsor #yiv15445=
41413ov li {font-size:77%;list-style-type:square;padding:6px 0;}#yiv1544541=
413 #yiv1544541413ygrp-sponsor #yiv1544541413ov ul {margin:0;padding:0 0 0 =
8px;}#yiv1544541413 #yiv1544541413ygrp-text {font-family:Georgia;}#yiv15445=
41413 #yiv1544541413ygrp-text p {margin:0 0 1em 0;}#yiv1544541413 #yiv15445=
41413ygrp-text tt {font-size:120%;}#yiv1544541413 #yiv1544541413ygrp-vital =
ul li:last-child {border-right:none !important;}#yiv1544541413=20
=20=20
[Non-text portions of this message have been removed]
------------------------------------
Posted by: Gurdev Singh <[email protected]>
------------------------------------
-----
To unsubscribe send a message to: [email protected]=
m
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my membe=
rship"
----