• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

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

Explorer ,
Nov 15, 2020 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

680

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
community guidelines
Adobe
Community Expert ,
Nov 15, 2020 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

Votes

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
community guidelines
People's Champ ,
Nov 15, 2020 Nov 15, 2020

Copy link to clipboard

Copied

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

Votes

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
community guidelines