Skip to main content

DisplayOptions

サマリー

The DisplayOptions object is used to modify the application antialiasing mode setting.

ディスカッション

This object is only needed if you want to modify the antialiasing mode to something other than the default value of FAST.

The CreateExportOptions function can be used to create a DisplayOptions object if the class_type parameter is set to DISPLAY. The returned object contains the property needed to configure the antialiasing mode.

注意:

This setting is only applied when running stand-alone scripts. If you run a script in the application, this setting will be ignored and the application antialiasing mode setting will be used instead. To change the setting in the application, click the Project tab, click Options, click Display, and set the Antialiasing mode value.

プロパティ

名前 説明 データ タイプ

antialiasing

(読み取り/書き込み)

A string constant that represents how jagged edges may appear in an export. The amount of smoothing depends on the speed you set. The default value is FAST.

  • BEST—The best smoothing in 2D rendering will be applied, but it may result in lower drawing performance.

  • FAST—The least smoothing in 2D rendering will be applied, but it may result in faster drawing performance.

  • NONE—Antialiasing will be disabled.

  • NORMAL—Intermediate smoothing in 2D rendering will be applied and result in intermediate drawing performance.

String

方法

setAntialiasing(antialiasing)

The setAntialiasing method is used to set the antialiasing mode for script that are run outside of the application.

名前 説明 データ タイプ

antialiasing

  • BEST—The best smoothing in 2D rendering will be applied, but it may result in lower drawing performance.

  • FAST—The least smoothing in 2D rendering will be applied , but it may result in faster drawing performance.

  • NONE—Antialiasing will be disabled.

  • NORMAL—Intermediate smoothing in 2D rendering will be applied and result in intermediate drawing performance.

The default value is FAST.

String

コードのサンプル

DisplayOptions example

The following script exports a Layout object using default PDFFormat properties but configures DisplayOptions to set antialiasing to BEST.

import arcpy
p = arcpy.mp.ArcGISProject(r'C:\Projects\YosemiteNP\Yosemite.aprx')
lyt = p.listLayouts('Main Attractions')[0]

pdf = arcpy.mp.CreateExportFormat('PDF')
pdf.filePath = r'C:\Projects\YosemiteNP\YosemiteMainAttractions.pdf'

disOpt = arcpy.mp.CreateExportOptions('DISPLAY')
disOpt.setAntialiasing('BEST')

lyt.export(pdf, disOpt)