The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > Developer > AppleScripting Omni Apps
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
questions on point list in AppleScript Thread Tools Search this Thread Display Modes
In the point list for a bezier object copied from OG to AppleScript, I think every three points in the list describes a point on the path and its two control points. Is this correct?

Which one is the actual destination point of the draw operation?

What does it mean if two of the points have the same x and y values?

What does it mean if all three points have the same x and y values?

Probably outside the scope of this forum, but I'll ask anyway:
Does anyone know an easy way to take a point list from AppleScript and turn it into a series of messages to an NSBezierPath object in Cocoa to draw the same shape in an NSView? I can get everything almost working, but not quite. The lower curve on my shape (see below) comes out wrong.

Here's the shape I'm working with:
Code:
tell application "OmniGraffle Professional 5"
	tell layer "Layer 2" of canvas of front window
		make new shape at end of graphics with properties {fill color:{1.0, 1.0, 1.0}, ¬
		draws shadow:false, stroke color:{0.0, 0.0, 0.0}, thickness:4, ¬
		point list:{{215.0094, 121.1161}, {194.3519, 121.1161}, {177.6077, 111.5196}, ¬
		{177.6077, 77.55308}, {177.6077, 77.55308}, {166.9595, 77.55308}, ¬
		{166.9595, 77.55308}, {166.9595, 77.55308}, {166.9595, 49.36419}, ¬
		{166.9595, 49.36419}, {166.9595, 49.36419}, {170.855, 45.52066}, ¬
		{170.855, 45.52066}, {170.855, 45.52066}, {183.4891, 44.45979}, ¬
		{183.4891, 44.45979}, {187.1026, 35.175}, {192.1896, 27.59161}, ¬
		{198.2134, 22.60616}, {198.2134, 22.60616}, {199.2312, 13.48825}, ¬
		{199.2312, 13.48825}, {199.2312, 13.48825}, {203.3185, 9.644714}, ¬
		{203.3185, 9.644714}, {203.3185, 9.644714}, {226.6957, 9.644714}, ¬
		{226.6957, 9.644714}, {226.6957, 9.644714}, {230.7852, 13.48825}, ¬
		{230.7852, 13.48825}, {230.7852, 13.48825}, {231.8031, 22.60616}, ¬
		{231.8031, 22.60616}, {237.8224, 27.59161}, {242.9117, 35.175}, ¬
		{246.5272, 44.45979}, {246.5272, 44.45979}, {259.1614, 45.52066}, ¬
		{259.1614, 45.52066}, {259.1614, 45.52066}, {263.0568, 49.36419}, ¬
		{263.0568, 49.36419}, {263.0568, 49.36419}, {263.0568, 77.55308}, ¬
		{263.0568, 77.55308}, {263.0568, 77.55308}, {252.4066, 77.55308}, ¬
		{252.4066, 77.55308}, {252.4066, 111.5196}, {235.6602, 121.1161}, ¬
		{215.0094, 121.1161}, {215.0094, 121.1161}, {215.0094, 121.1161}}, ¬
		name:"Bezier", stroke cap:butt, stroke join:miter}
	end tell
end tell
And here are pictures of how it looks in OG and how it looks drawn in Cocoa:

 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
applescript to put text to the left of a point? gshenaut OmniGraffle General 0 2013-03-02 08:31 PM
"No current point for control point bounds" robertjlamb OmniGraffle General 1 2011-07-20 10:26 AM
AppleScript support wish list philb OmniWeb Feature Requests 0 2008-02-16 01:24 PM
1.1 Beta 1 - Applescript Questions alansg OmniPlan General 4 2007-03-10 09:06 AM
Applescript Help: getting a list of tasks tweir OmniPlan General 3 2007-01-10 02:33 PM


All times are GMT -8. The time now is 10:58 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.