Message from discussion
Get/Set the radius of Path.Circle items
Received: by 10.68.222.71 with SMTP id qk7mr4234167pbc.1.1327887467860;
Sun, 29 Jan 2012 17:37:47 -0800 (PST)
X-BeenThere: paperjs@googlegroups.com
Received: by 10.68.35.167 with SMTP id i7ls19471276pbj.1.gmail; Sun, 29 Jan
2012 17:37:47 -0800 (PST)
MIME-Version: 1.0
Received: by 10.68.234.199 with SMTP id ug7mr2524919pbc.12.1327887467019; Sun,
29 Jan 2012 17:37:47 -0800 (PST)
Authentication-Results: ls.google.com; spf=pass (google.com: domain of
bigblackw...@gmail.com designates internal as permitted sender)
smtp.mail=bigblackw...@gmail.com; dkim=pass
header...@gmail.com
Received: by b10g2000pbd.googlegroups.com with HTTP; Sun, 29 Jan 2012 17:37:47
-0800 (PST)
Date: Sun, 29 Jan 2012 17:37:47 -0800 (PST)
In-Reply-To: <5275788.952.1327885187989.JavaMail.geo-discussion-forums@vbzs10>
References: <16162452.83.1327798110102.JavaMail.geo-discussion-forums@vbes1>
<15164234.948.1327880655712.JavaMail.geo-discussion-forums@vbhn11> <5275788.952.1327885187989.JavaMail.geo-discussion-forums@vbzs10>
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8)
AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.7,gzip(gfe)
Message-ID: <062c987f-e33e-4b29-a2a2-4ad2f24dc282@b10g2000pbd.googlegroups.com>
Subject: Re: Get/Set the radius of Path.Circle items
From: Alex Blackwood <bigblackw...@gmail.com>
To: "Paper.js" <paperjs@googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
Since it's a circle, why not just use the vector length between any
segment and the center?
var circlePath = new Path.Circle(view.center,100);
circlePath.strokeColor='black';
circlePath.strokeWidth = 50;
function radGet(circle){
rad = (circle.firstSegment.point-circle.bounds.center).length;
return rad;
}
var test = new PointText(new Point(view.center));
test.content= radGet(circlePath);