Edit in GitHubLog an issue

Guides

A collections class allowing for array access into a document's guides

Access this collection through Document.guides property. For example, following adds a new guide to the collection:

Copied to your clipboard
app.activeDocument.guides.add(Constants.Direction.HORIZONTAL, 20);

Indexable

▪ [index: number]: Guide

Used to access the guides in the collection.

Access this collection through Document.guides property. For example, following adds a new guide to the collection:

Copied to your clipboard
app.activeDocument.guides.add(Constants.Direction.HORIZONTAL, 20);

Properties

名称类型访问最低版本描述
lengthnumberR23.0Number of Guide elements in this collection.
parentDocumentR23.0The owner document of this Guide collection.

Methods

add

23.0

Guide

Adds a guide for the collection at the given coordinate and direction

Fixes in Photoshop 24.0:

  • Correct coordinate when resolution is not 72 PPI
  • Returns valid instance of guide

Parameters

名称类型描述
directionDirectionIndicates whether the guide is vertical or horizontal
coordinatenumberPosition of the guide measured from the ruler origin in pixels. The value can be a decimal number. Note: the user can move the ruler origin which will affect the position value of the guides.

removeAll

23.0

void

Clears all guides from this collection.

Was this helpful?
  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2023 Adobe. All rights reserved.