Highlighted

What is the easiest way to draw a rectangle in a script?

Community Beginner ,
Nov 15, 2020

Copy link to clipboard

Copied

How do I draw a simple rectangle with a colored stroke and a transparent fill?  I could use Mike Hale's DrawShape() function, but isn't there something simpler?  In PhotoShop CC 2021, I draw a rectangle and it gives me the rectangle on a separate layer.  That would be great for my purpose.  The PhotoShop CC JavaScript Referencce document doesn't seem to have anything for creating rectangles, but it's very likely I'm looking in the wrong place.

TOPICS
Actions and scripting

Views

38

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

What is the easiest way to draw a rectangle in a script?

Community Beginner ,
Nov 15, 2020

Copy link to clipboard

Copied

How do I draw a simple rectangle with a colored stroke and a transparent fill?  I could use Mike Hale's DrawShape() function, but isn't there something simpler?  In PhotoShop CC 2021, I draw a rectangle and it gives me the rectangle on a separate layer.  That would be great for my purpose.  The PhotoShop CC JavaScript Referencce document doesn't seem to have anything for creating rectangles, but it's very likely I'm looking in the wrong place.

TOPICS
Actions and scripting

Views

39

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Nov 15, 2020 0
Most Valuable Participant ,
Nov 15, 2020

Copy link to clipboard

Copied

Set a rectangle selection. add  an artlayet and stroke the selection. It would not be a shape layer like Mike's DrawShape function creates.

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 15, 2020 0
r-bin LATEST
Adobe Community Professional ,
Nov 15, 2020

Copy link to clipboard

Copied

Draw a rectangular selection.
Draw another smaller rectangular selection in subtraction mode. Fill the selection with the color you want.
 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
Nov 15, 2020 0