Synthèse
The DisplayOptions object is used to modify the application antialiasing mode setting.
Discussion
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.
Remarque :
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.
Propriétés
Propriété | Explication | Type de données |
antialiasing (Lecture et écriture) | 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.
| String |
Vue d’ensemble des méthodes
Méthode | Explication |
setAntialiasing (antialiasing) | The setAntialiasing method is used to set the antialiasing mode for script that are run outside of the application. |
Méthodes
setAntialiasing (antialiasing)
Paramètre | Explication | Type de données |
antialiasing |
(La valeur par défaut est FAST) | String |
Exemple de code
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)
Vous avez un commentaire à formuler concernant cette rubrique ?