New in the App Store: SinterPixels: a completely AppleScript-driven macOS drawing app

I have a bunch of example scripts and a walkthrough of all the features at this public GitHub: https://github.com/olofhellman/SinterpixelsSupportFiles/blob/main/docs/TableOfContents.md

Its a “Sal and Cal would love it” AppleScript object model, with nouns like ‘circle’, ‘path’, ‘polygon’, ‘vertex’, ‘pixel’, ‘text shape’, and custom verbs like reflect to make a mirror image and start, record movie frame, and stop as a way to export .mov

As an example, here’s a script which was used to generate the SinterPixels app icon itself.

to newSquare(doca, len, pos)
    tell application “SinterPixels”
      tell doca
         make new polygon with properties {radius:len / 1.414, position:pos, line width:0, fill color:white, rotation:45, vertex count:4}
      end tell
   end tell
end newSquare

to newCircle(doca, rad, pos)
   tell application “SinterPixels”
      tell doca
         set newC to make new circle with properties {radius:rad, position:pos, line width:0, fill color:white}
      end tell
   end tell
   return newC
end newCircle

to makeIconBackground()
   my newSquare(iconDoc, 512, {256, 0})
   my newSquare(iconDoc, 512, {-256, 0})
   my newSquare(iconDoc, 512, {0, 256})
   my newSquare(iconDoc, 512, {0, -256})
   my newCircle(iconDoc, 256, {256, -256})
   my newCircle(iconDoc, 256, {-256, -256})
   my newCircle(iconDoc, 256, {256, 256})
   my newCircle(iconDoc, 256, {-256, 256})
end makeIconBackground

tell application “SinterPixels”
   close every document without saving
   set iconDoc to make new document with properties {height:1024, width:1024}
   my makeIconBackground()
   tell iconDoc
      set pPoly to make new polygon with properties {position:{0, 0}, vertex:{{-216, -472}, {394, -472}, {512, 150}, {-98, 150}}, fill color:{1.0, 0.29, 0.29}, line width:0}
   end tell
   set sCirc to my newCircle(iconDoc, 380, {-130, 110})
   set fill color of sCirc to {0.31, 0.31, 0.93}
   set sCirc to my newCircle(iconDoc, 200, {220, -220})
   set fill color of sCirc to {1.0, 0.29, 0.29}
   tell iconDoc
      set sText to make new text shape with properties {position:{-124, 80}, fill color:black, line width:0, font:“Helvetica”, bold:true, text content:“S”, font size:542}
      set pText to make new text shape with properties {position:{140, -91}, fill color:black, line width:0, font:“Helvetica”, bold:true, italic:true, text content:“p”, font size:542}
   end tell
end tell

The app is free for documents with up to 12 shapes (and a few other restrictions), with subscription to unlock the rest. I’d love to hear everyone’s feedback.

Unfortunately, I will never buy an app or utility that is subscription based.

That’s just me.

2 Likes

Looks interesting, thanks for posting.

FYI, clicking on the website link on the AppStore page is broken (404)
https://tomographic.com/sinterpixels

The website link issue looks like a capitalization error! Fixing now. Thanks for letting me know!

1 Like

Does the program have a way to draw arcs?

There is certainly the ability to draw arc-like paths, even if they are not strictly mathematical “arcs”. The user documentation is on GitHub, and the section on bezier-ish paths begins here:

SinterpixelsPaths.md

In short, path objects contain anchors, each anchor has a position and tangent property. One can make a path with anchor data like this:

tell application "SinterPixels"
	tell document 1
		set a1 to {position:{-100, 0}, tangent:0}
		set a2 to {position:{0, 50}, tangent:0}
		set a3 to {position:{100, 0}, tangent:0}		
		set thePath to make new path with properties {anchor data:{a1, a2, a3}, position:{0, 0}, line width:5}	
	end tell
end tell

or one can extend an existing path with something like:

     make new anchor at end of path 1 with properties {position:{60, -60}, tangent:270}

Hope that answers your question!

  • Olof