@itwin/core-common 5.5.0-dev.2 → 5.5.0-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -1
- package/lib/cjs/AmbientOcclusion.js.map +1 -1
- package/lib/cjs/AnalysisStyle.js.map +1 -1
- package/lib/cjs/Atmosphere.js.map +1 -1
- package/lib/cjs/AuthorizationClient.js.map +1 -1
- package/lib/cjs/BackgroundMapProvider.js.map +1 -1
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/Base64EncodedString.js.map +1 -1
- package/lib/cjs/BlobReader.js.map +1 -1
- package/lib/cjs/BriefcaseTypes.js.map +1 -1
- package/lib/cjs/Camera.js.map +1 -1
- package/lib/cjs/CatalogIModel.js.map +1 -1
- package/lib/cjs/CesiumIonAssets.js.map +1 -1
- package/lib/cjs/ChangedElements.js.map +1 -1
- package/lib/cjs/ChangedEntities.js.map +1 -1
- package/lib/cjs/ChangesetProps.js.map +1 -1
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/Code.js.map +1 -1
- package/lib/cjs/ColorByName.js.map +1 -1
- package/lib/cjs/ColorDef.js.map +1 -1
- package/lib/cjs/CommonLoggerCategory.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ContextRealityModel.js.map +1 -1
- package/lib/cjs/ContourDisplay.js.map +1 -1
- package/lib/cjs/DisplayStyleSettings.js.map +1 -1
- package/lib/cjs/ECSchemaProps.js.map +1 -1
- package/lib/cjs/ECSqlReader.js.map +1 -1
- package/lib/cjs/ECSqlTypes.js.map +1 -1
- package/lib/cjs/ElementMesh.js.map +1 -1
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EmphasizeElementsProps.js.map +1 -1
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/EntityReference.js.map +1 -1
- package/lib/cjs/Environment.js.map +1 -1
- package/lib/cjs/FeatureIndex.js.map +1 -1
- package/lib/cjs/FeatureSymbology.js.map +1 -1
- package/lib/cjs/FeatureTable.js.map +1 -1
- package/lib/cjs/Fonts.js.map +1 -1
- package/lib/cjs/Frustum.js.map +1 -1
- package/lib/cjs/GenericInstanceFilter.js.map +1 -1
- package/lib/cjs/GeoCoordinateServices.js.map +1 -1
- package/lib/cjs/GeometryContainment.js.map +1 -1
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/GeometrySummary.js.map +1 -1
- package/lib/cjs/Gradient.js.map +1 -1
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/GroundPlane.js.map +1 -1
- package/lib/cjs/HSLColor.js.map +1 -1
- package/lib/cjs/HSVColor.js.map +1 -1
- package/lib/cjs/HiddenLine.js.map +1 -1
- package/lib/cjs/Hilite.js.map +1 -1
- package/lib/cjs/IModel.js.map +1 -1
- package/lib/cjs/IModelError.js.map +1 -1
- package/lib/cjs/IModelVersion.js.map +1 -1
- package/lib/cjs/ITwinCoreErrors.js.map +1 -1
- package/lib/cjs/Image.js.map +1 -1
- package/lib/cjs/IpcAppProps.js.map +1 -1
- package/lib/cjs/LightSettings.js.map +1 -1
- package/lib/cjs/LinePixels.js.map +1 -1
- package/lib/cjs/Localization.js.map +1 -1
- package/lib/cjs/MapImagerySettings.js.map +1 -1
- package/lib/cjs/MapLayerSettings.js.map +1 -1
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/MaterialProps.js.map +1 -1
- package/lib/cjs/ModelClipGroup.js.map +1 -1
- package/lib/cjs/ModelGeometryChanges.js.map +1 -1
- package/lib/cjs/ModelProps.js.map +1 -1
- package/lib/cjs/NativeAppProps.js.map +1 -1
- package/lib/cjs/OctEncodedNormal.js.map +1 -1
- package/lib/cjs/PlanProjectionSettings.js.map +1 -1
- package/lib/cjs/PlanarClipMask.js.map +1 -1
- package/lib/cjs/QPoint.js.map +1 -1
- package/lib/cjs/RealityDataAccessProps.js.map +1 -1
- package/lib/cjs/RealityModelDisplaySettings.js.map +1 -1
- package/lib/cjs/RenderMaterial.js.map +1 -1
- package/lib/cjs/RenderPolyline.js.map +1 -1
- package/lib/cjs/RenderTexture.js.map +1 -1
- package/lib/cjs/RgbColor.js.map +1 -1
- package/lib/cjs/RpcInterface.js.map +1 -1
- package/lib/cjs/RpcManager.js.map +1 -1
- package/lib/cjs/SessionProps.js.map +1 -1
- package/lib/cjs/SkyBox.js.map +1 -1
- package/lib/cjs/SolarCalculate.js.map +1 -1
- package/lib/cjs/SolarShadows.js.map +1 -1
- package/lib/cjs/SpatialClassification.js.map +1 -1
- package/lib/cjs/SubCategoryAppearance.js.map +1 -1
- package/lib/cjs/SubCategoryOverride.js.map +1 -1
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/TextureMapping.js.map +1 -1
- package/lib/cjs/TextureProps.js.map +1 -1
- package/lib/cjs/ThematicDisplay.js.map +1 -1
- package/lib/cjs/Thumbnail.js.map +1 -1
- package/lib/cjs/TileProps.js.map +1 -1
- package/lib/cjs/Tween.js.map +1 -1
- package/lib/cjs/TxnAction.js.map +1 -1
- package/lib/cjs/ViewDetails.js.map +1 -1
- package/lib/cjs/ViewFlags.js.map +1 -1
- package/lib/cjs/ViewProps.js.map +1 -1
- package/lib/cjs/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlock.js.map +1 -1
- package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/cjs/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/cjs/annotation/TextField.js.map +1 -1
- package/lib/cjs/annotation/TextStyle.js.map +1 -1
- package/lib/cjs/core-common.js.map +1 -1
- package/lib/cjs/domains/FunctionalElementProps.js.map +1 -1
- package/lib/cjs/domains/GenericElementProps.js.map +1 -1
- package/lib/cjs/geometry/AdditionalTransform.js.map +1 -1
- package/lib/cjs/geometry/AreaPattern.js.map +1 -1
- package/lib/cjs/geometry/BoundingSphere.js.map +1 -1
- package/lib/cjs/geometry/Cartographic.js.map +1 -1
- package/lib/cjs/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/cjs/geometry/FrustumPlanes.js.map +1 -1
- package/lib/cjs/geometry/GeodeticDatum.js.map +1 -1
- package/lib/cjs/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/cjs/geometry/GeometryStream.js.map +1 -1
- package/lib/cjs/geometry/ImageGraphic.js.map +1 -1
- package/lib/cjs/geometry/LineStyle.js.map +1 -1
- package/lib/cjs/geometry/Placement.js.map +1 -1
- package/lib/cjs/geometry/Projection.js.map +1 -1
- package/lib/cjs/geometry/TextString.js.map +1 -1
- package/lib/cjs/internal/BackendTypes.js.map +1 -1
- package/lib/cjs/internal/PackedFeatureTable.js.map +1 -1
- package/lib/cjs/internal/RenderMaterialParams.js.map +1 -1
- package/lib/cjs/internal/RenderMesh.js.map +1 -1
- package/lib/cjs/internal/RenderTextureParams.js.map +1 -1
- package/lib/cjs/internal/Snapping.js.map +1 -1
- package/lib/cjs/internal/annotations/FieldFormatter.js.map +1 -1
- package/lib/cjs/internal/cross-package.js.map +1 -1
- package/lib/cjs/ipc/IpcSession.js.map +1 -1
- package/lib/cjs/ipc/IpcSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocket.js.map +1 -1
- package/lib/cjs/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/cjs/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/TestRpcManager.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/core/RpcControl.js.map +1 -1
- package/lib/cjs/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/cjs/rpc/core/RpcOperation.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/cjs/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/core/RpcPush.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequest.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/cjs/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/cjs/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/cjs/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/cjs/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/cjs/tile/B3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/CompositeTileIO.js.map +1 -1
- package/lib/cjs/tile/ElementGraphics.js.map +1 -1
- package/lib/cjs/tile/GltfTileIO.js.map +1 -1
- package/lib/cjs/tile/I3dmTileIO.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/PntsTileIO.js.map +1 -1
- package/lib/cjs/tile/TileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/cjs/tile/Tileset3dSchema.js.map +1 -1
- package/lib/esm/AmbientOcclusion.js.map +1 -1
- package/lib/esm/AnalysisStyle.js.map +1 -1
- package/lib/esm/Atmosphere.js.map +1 -1
- package/lib/esm/AuthorizationClient.js.map +1 -1
- package/lib/esm/BackgroundMapProvider.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/Base64EncodedString.js.map +1 -1
- package/lib/esm/BlobReader.js.map +1 -1
- package/lib/esm/BriefcaseTypes.js.map +1 -1
- package/lib/esm/Camera.js.map +1 -1
- package/lib/esm/CatalogIModel.js.map +1 -1
- package/lib/esm/CesiumIonAssets.js.map +1 -1
- package/lib/esm/ChangedElements.js.map +1 -1
- package/lib/esm/ChangedEntities.js.map +1 -1
- package/lib/esm/ChangesetProps.js.map +1 -1
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/Code.js.map +1 -1
- package/lib/esm/ColorByName.js.map +1 -1
- package/lib/esm/ColorDef.js.map +1 -1
- package/lib/esm/CommonLoggerCategory.js.map +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ContextRealityModel.js.map +1 -1
- package/lib/esm/ContourDisplay.js.map +1 -1
- package/lib/esm/DisplayStyleSettings.js.map +1 -1
- package/lib/esm/ECSchemaProps.js.map +1 -1
- package/lib/esm/ECSqlReader.js.map +1 -1
- package/lib/esm/ECSqlTypes.js.map +1 -1
- package/lib/esm/ElementMesh.js.map +1 -1
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EmphasizeElementsProps.js.map +1 -1
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/EntityReference.js.map +1 -1
- package/lib/esm/Environment.js.map +1 -1
- package/lib/esm/FeatureIndex.js.map +1 -1
- package/lib/esm/FeatureSymbology.js.map +1 -1
- package/lib/esm/FeatureTable.js.map +1 -1
- package/lib/esm/Fonts.js.map +1 -1
- package/lib/esm/Frustum.js.map +1 -1
- package/lib/esm/GenericInstanceFilter.js.map +1 -1
- package/lib/esm/GeoCoordinateServices.js.map +1 -1
- package/lib/esm/GeometryContainment.js.map +1 -1
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/GeometrySummary.js.map +1 -1
- package/lib/esm/Gradient.js.map +1 -1
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/GroundPlane.js.map +1 -1
- package/lib/esm/HSLColor.js.map +1 -1
- package/lib/esm/HSVColor.js.map +1 -1
- package/lib/esm/HiddenLine.js.map +1 -1
- package/lib/esm/Hilite.js.map +1 -1
- package/lib/esm/IModel.js.map +1 -1
- package/lib/esm/IModelError.js.map +1 -1
- package/lib/esm/IModelVersion.js.map +1 -1
- package/lib/esm/ITwinCoreErrors.js.map +1 -1
- package/lib/esm/Image.js.map +1 -1
- package/lib/esm/IpcAppProps.js.map +1 -1
- package/lib/esm/LightSettings.js.map +1 -1
- package/lib/esm/LinePixels.js.map +1 -1
- package/lib/esm/Localization.js.map +1 -1
- package/lib/esm/MapImagerySettings.js.map +1 -1
- package/lib/esm/MapLayerSettings.js.map +1 -1
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/MaterialProps.js.map +1 -1
- package/lib/esm/ModelClipGroup.js.map +1 -1
- package/lib/esm/ModelGeometryChanges.js.map +1 -1
- package/lib/esm/ModelProps.js.map +1 -1
- package/lib/esm/NativeAppProps.js.map +1 -1
- package/lib/esm/OctEncodedNormal.js.map +1 -1
- package/lib/esm/PlanProjectionSettings.js.map +1 -1
- package/lib/esm/PlanarClipMask.js.map +1 -1
- package/lib/esm/QPoint.js.map +1 -1
- package/lib/esm/RealityDataAccessProps.js.map +1 -1
- package/lib/esm/RealityModelDisplaySettings.js.map +1 -1
- package/lib/esm/RenderMaterial.js.map +1 -1
- package/lib/esm/RenderPolyline.js.map +1 -1
- package/lib/esm/RenderTexture.js.map +1 -1
- package/lib/esm/RgbColor.js.map +1 -1
- package/lib/esm/RpcInterface.js.map +1 -1
- package/lib/esm/RpcManager.js.map +1 -1
- package/lib/esm/SessionProps.js.map +1 -1
- package/lib/esm/SkyBox.js.map +1 -1
- package/lib/esm/SolarCalculate.js.map +1 -1
- package/lib/esm/SolarShadows.js.map +1 -1
- package/lib/esm/SpatialClassification.js.map +1 -1
- package/lib/esm/SubCategoryAppearance.js.map +1 -1
- package/lib/esm/SubCategoryOverride.js.map +1 -1
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/TextureMapping.js.map +1 -1
- package/lib/esm/TextureProps.js.map +1 -1
- package/lib/esm/ThematicDisplay.js.map +1 -1
- package/lib/esm/Thumbnail.js.map +1 -1
- package/lib/esm/TileProps.js.map +1 -1
- package/lib/esm/Tween.js.map +1 -1
- package/lib/esm/TxnAction.js.map +1 -1
- package/lib/esm/ViewDetails.js.map +1 -1
- package/lib/esm/ViewFlags.js.map +1 -1
- package/lib/esm/ViewProps.js.map +1 -1
- package/lib/esm/WhiteOnWhiteReversalSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlock.js.map +1 -1
- package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/esm/annotation/TextBlockLayoutResult.js.map +1 -1
- package/lib/esm/annotation/TextField.js.map +1 -1
- package/lib/esm/annotation/TextStyle.js.map +1 -1
- package/lib/esm/core-common.js.map +1 -1
- package/lib/esm/domains/FunctionalElementProps.js.map +1 -1
- package/lib/esm/domains/GenericElementProps.js.map +1 -1
- package/lib/esm/geometry/AdditionalTransform.js.map +1 -1
- package/lib/esm/geometry/AreaPattern.js.map +1 -1
- package/lib/esm/geometry/BoundingSphere.js.map +1 -1
- package/lib/esm/geometry/Cartographic.js.map +1 -1
- package/lib/esm/geometry/CoordinateReferenceSystem.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/geometry/ElementGeometryFB.js.map +1 -1
- package/lib/esm/geometry/FrustumPlanes.js.map +1 -1
- package/lib/esm/geometry/GeodeticDatum.js.map +1 -1
- package/lib/esm/geometry/GeodeticEllipsoid.js.map +1 -1
- package/lib/esm/geometry/GeometryStream.js.map +1 -1
- package/lib/esm/geometry/ImageGraphic.js.map +1 -1
- package/lib/esm/geometry/LineStyle.js.map +1 -1
- package/lib/esm/geometry/Placement.js.map +1 -1
- package/lib/esm/geometry/Projection.js.map +1 -1
- package/lib/esm/geometry/TextString.js.map +1 -1
- package/lib/esm/internal/BackendTypes.js.map +1 -1
- package/lib/esm/internal/PackedFeatureTable.js.map +1 -1
- package/lib/esm/internal/RenderMaterialParams.js.map +1 -1
- package/lib/esm/internal/RenderMesh.js.map +1 -1
- package/lib/esm/internal/RenderTextureParams.js.map +1 -1
- package/lib/esm/internal/Snapping.js.map +1 -1
- package/lib/esm/internal/annotations/FieldFormatter.js.map +1 -1
- package/lib/esm/internal/cross-package.js.map +1 -1
- package/lib/esm/ipc/IpcSession.js.map +1 -1
- package/lib/esm/ipc/IpcSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocket.js.map +1 -1
- package/lib/esm/ipc/IpcWebSocketTransport.js.map +1 -1
- package/lib/esm/rpc/DevToolsRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/IModelTileRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/TestRpcManager.js.map +1 -1
- package/lib/esm/rpc/core/RpcConfiguration.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
- package/lib/esm/rpc/core/RpcControl.js.map +1 -1
- package/lib/esm/rpc/core/RpcInvocation.js.map +1 -1
- package/lib/esm/rpc/core/RpcMarshaling.js.map +1 -1
- package/lib/esm/rpc/core/RpcOperation.js.map +1 -1
- package/lib/esm/rpc/core/RpcPendingQueue.js.map +1 -1
- package/lib/esm/rpc/core/RpcProtocol.js.map +1 -1
- package/lib/esm/rpc/core/RpcPush.js.map +1 -1
- package/lib/esm/rpc/core/RpcRegistry.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequest.js.map +1 -1
- package/lib/esm/rpc/core/RpcRequestContext.js.map +1 -1
- package/lib/esm/rpc/core/RpcRoutingToken.js.map +1 -1
- package/lib/esm/rpc/core/RpcSessionInvocation.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcManager.js.map +1 -1
- package/lib/esm/rpc/web/BentleyCloudRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/RpcMultipart.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcLogging.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcRequest.js.map +1 -1
- package/lib/esm/rpc/web/multipart/RpcMultipartParser.js.map +1 -1
- package/lib/esm/tile/B3dmTileIO.js.map +1 -1
- package/lib/esm/tile/CompositeTileIO.js.map +1 -1
- package/lib/esm/tile/ElementGraphics.js.map +1 -1
- package/lib/esm/tile/GltfTileIO.js.map +1 -1
- package/lib/esm/tile/I3dmTileIO.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/PntsTileIO.js.map +1 -1
- package/lib/esm/tile/TileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/lib/esm/tile/Tileset3dSchema.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextStyle.js","sourceRoot":"","sources":["../../../src/annotation/TextStyle.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,0CAAsD;AACtD,oCAAwD;AAExD;;;GAGG;AACH,IAAY,oBAUX;AAVD,WAAY,oBAAoB;IAC9B,uBAAuB;IACvB,oCAAY,CAAA;IACZ,0CAAkB,CAAA;IAClB,oCAAY,CAAA;IACZ,yCAAY,CAAA;IACZ,yCAAY,CAAA;IACZ,yCAAY,CAAA;IACZ,cAAc;IACd,uCAAU,CAAA;AACZ,CAAC,EA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I,IAAI,CAAC,WAAW,KAAK,KAAK,CAAC,WAAW;eAChF,IAAI,CAAC,UAAU,CAAC,IAAI,KAAK,KAAK,CAAC,UAAU,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,UAAU,KAAK,KAAK,CAAC,UAAU,CAAC,UAAU;eAC1K,IAAI,CAAC,aAAa,KAAK,KAAK,CAAC,aAAa;eAC1C,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,MAAM,CAAC;eAC/B,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC;eAC7B,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;IACxC,CAAC;IAED;;;;;;;;;OASG;IACI,mBAAmB;QACxB,MAAM,aAAa,GAAa,EAAE,CAAC;QACnC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAAC;YACjC,aAAa,CAAC,IAAI,CAAC,4BAA4B,CAAC,CAAC;QACnD,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,EAAE,CAAC;YACzB,aAAa,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAC;QAC1D,CAAC;QAED,IAAI,IAAI,CAAC,oBAAoB,IAAI,CAAC,EAAE,CAAC;YACnC,aAAa,CAAC,IAAI,CAAC,6CAA6C,CAAC,CAAC;QACpE,CAAC;QAED,OAAO,aAAa,CAAC;IACvB,CAAC;;AA9PH,8CA+PC;AAED,UAAU,CAAC,iBAAiB,CAAC,YAAY,CAAC,CAAC;AAC3C,UAAU,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Annotation\n */\n\nimport { DeepReadonlyObject, DeepRequiredObject } from \"@itwin/core-bentley\";\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\nimport { FontFamilySelector, FontType } from \"../Fonts\";\n\n/** Predefined markers for list items in text annotations.\n * These values control the appearance of list item markers (e.g., bullet, circle, square, dash, number) that denote the start of a list item in a list.\n * @beta\n */\nexport enum ListMarkerEnumerator {\n /** English Alphabet */\n Letter = \"A\",\n RomanNumeral = \"I\",\n Number = \"1\",\n Bullet = \"•\",\n Circle = \"○\",\n Square = \"■\",\n /** EM Dash */\n Dash = \"–\",\n}\n\n/** A settings to specify how to mark or denote the start of a list item in a [[List]].\n * @beta\n */\nexport interface ListMarker {\n /** This can be either one of the predefined markers in [[ListMarkerEnumerator]], or any arbitrary string. */\n enumerator: ListMarkerEnumerator | string,\n /** The punctuation to follow the enumerator. */\n terminator?: \"parenthesis\" | \"period\",\n /** Whether to use upper or lower case for alphabetic or roman numeral enumerators. Ignored if [[enumerator]] is not alphabetic or roman numeral. */\n case?: \"upper\" | \"lower\",\n}\n\n/** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]\n * @beta\n*/\nexport const textAnnotationFrameShapes = [\"none\", \"line\", \"rectangle\", \"circle\", \"equilateralTriangle\", \"diamond\", \"square\", \"pentagon\", \"hexagon\", \"octagon\", \"capsule\", \"roundedRectangle\"] as const;\n\n/** Describes a predefined shape that can be computed and drawn around the margins of a [[TextBlock]]\n * @beta\n*/\nexport type TextAnnotationFrameShape = typeof textAnnotationFrameShapes[number];\n\n/** Set of predefined shapes that can be used as terminators for leaders in a [[TextAnnotation]]\n * @beta\n*/\nexport const terminatorShapes = [\"openArrow\", \"closedArrow\", \"closedArrowFilled\", \"circle\", \"circleFilled\", \"slash\", \"none\"] as const;\n\n/** Describes a predefined shape that can be used as a terminator for leaders in a [[TextAnnotation]]\n * @beta\n*/\nexport type TerminatorShape = typeof terminatorShapes[number];\n\n/**\n * Describes what color to use when filling the frame around a [[TextBlock]].\n * If `background` is specified, [[GeometryParams.BackgroundFill]] will be set to `BackgroundFill.Outline`.\n * If `none` is specified, no fill will be applied.\n * @beta\n */\nexport type TextAnnotationFillColor = TextStyleColor | \"background\" | \"none\";\n\n/** Describes the margins around the content inside a [[TextBlock]], measured in meters.\n * All margins default to zero if `undefined`.\n * @beta\n */\nexport interface TextBlockMargins {\n /** The left margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n left?: number;\n /** The right margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n right?: number;\n /** The top margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n top?: number;\n /** The bottom margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\n bottom?: number;\n};\n\n/** Describes the relative alignment of text.\n * @beta\n*/\nexport type TextJustification = \"left\" | \"center\" | \"right\";\n\n/** Specifies how to separate the numerator and denominator of a [[FractionRun]], by either a horizontal or diagonal bar.\n * @see [[TextStyleSettingsProps.stackedFractionType]] and [[TextStyleSettings.stackedFractionType]].\n * @beta\n */\nexport type StackedFractionType = \"horizontal\" | \"diagonal\";\n\n/** Describes the color in which to draw the text in a [[TextRun]].\n * \"subcategory\" indicates that the text should be drawn using the color of the [SubCategory]($backend) specified by the [GeometryStream]($docs/learning/common/GeometryStream.md) hosting the\n * text.\n * @beta\n */\nexport type TextStyleColor = ColorDefProps | \"subcategory\";\n\n/**\n * Describes how to draw the frame around a [[TextAnnotation]].\n * The frame can be a simple line, a filled shape, or both.\n * If only a subset of properties are specified, the others will be set to their default value.\n * @beta\n */\nexport interface TextFrameStyleProps {\n /** Shape of the frame. Default: \"none\" */\n shape?: TextAnnotationFrameShape;\n /** The color to fill the shape of the text frame. This fill is applied using [[FillDisplay.Blanking]]. Default: \"none\" */\n fillColor?: TextAnnotationFillColor;\n /** The color of the text frame's outline. Default: black */\n borderColor?: TextStyleColor;\n /** This will be used to set the [[GeometryParams.weight]] property of the frame (in pixels). Default: 1px */\n borderWeight?: number;\n};\n\n/** Properties describing the appearance of [[TextAnnotationLeader]] in a [[TextAnnotation]].\n * Used when producing geometry for [[TextAnnotation]].\n * @beta\n */\nexport interface TextLeaderStyleProps {\n /** The color of the leader.\n * If `inherit` is specified, the [[TextAnnotationLeader]] will use the color specified in the parent [[TextStyleSettings]]`.\n * Default: \"inherit\".\n */\n color?: TextStyleColor | \"inherit\";\n /** Whether to use an elbow in the leader.\n * Default: false\n */\n wantElbow?: boolean;\n /** Multiplier used to compute length of the elbow in the leader.\n * The elbowLength is computed in meters as elbowLength * [[textHeight]].\n * Default: 1.0\n */\n elbowLength?: number;\n /**\n * The shape of the leader terminator.\n * Default:\"openArrow\"\n */\n terminatorShape?: TerminatorShape;\n /** Multiplier to compute height of the leader terminator.\n * The terminator height is computed in meters as terminatorHeight * [[textHeight]].\n * Default: 1.0\n */\n terminatorHeightFactor?: number;\n /** Multiplier to compute width of the leader terminator.\n * The terminator width is computed in meters as terminatorWidth * [[textHeight]].\n * Default: 1.0\n */\n terminatorWidthFactor?: number;\n}\n\n/** Serves both as the JSON representation of a [[TextStyleSettings]], and a way for a [[TextBlockComponent]] to selectively override aspects of a [AnnotationTextStyle]($backend)'s properties.\n * @beta\n */\nexport interface TextStyleSettingsProps {\n /** The color of the text.\n * Default: \"subcategory\".\n */\n color?: TextStyleColor;\n /** The font stored in an iModel, used to draw the contents of a [[TextRun]].\n * Default: { name: \"\" } (an invalid font name).\n */\n font?: FontFamilySelector;\n /** The height of the text, in meters. Many other settings use the text height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as textHeight * [[subScriptScale]] and\n * textHeight * [[subScriptOffsetFactor]], respectively.\n * Default: 1.0. */\n textHeight?: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[textHeight]].\n * Default: 0.5.\n */\n lineSpacingFactor?: number;\n /** Multiplier used to compute the vertical distance between two paragraphs of text.\n * The distance is computed in meters as paragraphSpacingFactor * [[textHeight]].\n * Default: 0.5.\n */\n paragraphSpacingFactor?: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**.\n * Default: false.\n */\n isBold?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*.\n * Default: false.\n */\n isItalic?: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined.\n * Default: false.\n */\n isUnderlined?: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[textHeight]].\n * Default: 0.7.\n */\n stackedFractionScale?: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]].\n * Default: \"horizontal\".\n */\n stackedFractionType?: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[textHeight]].\n * Default: -0.15.\n */\n subScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[textHeight]].\n * Default: 2/3\n */\n subScriptScale?: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[textHeight]].\n * Default: -0.5.\n */\n superScriptOffsetFactor?: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[textHeight]].\n * Default: 2/3\n */\n superScriptScale?: number;\n /** A scale applied to the width of each glyph.\n * Default: 1.0\n */\n widthFactor?: number;\n\n /** Properties describing appearance of leaders in a [[TextAnnotation]]\n * Used when producing geometry for [[TextAnnotation]]\n * Default: {color:\"subcategory\", wantElbow:\"false\",elbowLength:1, terminatorShape:\"openArrow\",terminatorWidthFactor:1, terminatorHeightFactor:1}.\n */\n leader?: TextLeaderStyleProps;\n /** The size (in meters) used to calculate the tab stops in a run.\n * These are equally spaced from the left edge of the TextBlock.\n * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\n * Default: 4 meters.\n */\n tabInterval?: number;\n /**\n * A description of the frame around the text annotation.\n * Used when producing geometry for [[TextAnnotation]]s.\n * Default: {shape: \"none\", fill: \"none\", border: black, borderWeight: 1} for no frame.\n */\n frame?: TextFrameStyleProps;\n /** The margins to surround the document content.\n * Default: 0 margins on all sides */\n margins?: TextBlockMargins;\n /** The offset (in meters) from the left edge of the text block to the start of the line of text.\n * In lists, the indentation is added to offset of list items.\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\n * Default: 0 meters.\n */\n indentation?: number;\n /** The marker used to indicate the start of a list item.\n * Default: \"1.\".\n */\n listMarker?: ListMarker;\n /** The alignment of the text content.\n * Default: \"left\". */\n justification?: TextJustification;\n}\n\nfunction deepFreeze<T>(obj: T) {\n if (obj === null || typeof obj !== \"object\" || Object.isFrozen(obj))\n return;\n Object.getOwnPropertyNames(obj).forEach((prop) => {\n const value = (obj as any)[prop];\n if (value && typeof value === \"object\") {\n deepFreeze(value);\n }\n });\n Object.freeze(obj);\n}\n\n/** A description of the formatting to be applied to a [[TextBlockComponent]].\n * Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\n * @see [[TextStyleSettingsProps]] for documentation of each of the settings.\n * @beta\n */\nexport class TextStyleSettings {\n /** The color of the text. */\n public readonly color: TextStyleColor;\n /** The font stored in an iModel, used to draw the contents of a [[TextRun]].\n */\n public readonly font: Readonly<Required<FontFamilySelector>>;\n /** The height of the text, in meters. Many other settings use the text height as the basis for computing their own values.\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as textHeight * [[subScriptScale]] and\n * textHeight * [[subScriptOffsetFactor]], respectively.\n */\n public readonly textHeight: number;\n /** Multiplier used to compute the vertical distance between two lines of text.\n * The distance is computed in meters as lineSpacingFactor * [[textHeight]] of the [[TextBlock]].\n */\n public readonly lineSpacingFactor: number;\n /** Multiplier used to compute the vertical distance between two paragraphs of text.\n * The distance is computed in meters as paragraphSpacingFactor * the [[TextBlock]]'s [[textHeight]].\n */\n public readonly paragraphSpacingFactor: number;\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */\n public readonly isBold: boolean;\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */\n public readonly isItalic: boolean;\n /** Specifies whether the content of a [[TextRun]] should be underlined. */\n public readonly isUnderlined: boolean;\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\n * The height is computed in meters as stackedFractionScale * [[textHeight]].\n */\n public readonly stackedFractionScale: number;\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */\n public readonly stackedFractionType: StackedFractionType;\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\n * The offset is computed in meters as subScriptOffsetFactor * [[textHeight]].\n */\n public readonly subScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a subscript [[TextRun]].\n * The height is computed as subScriptScale * [[textHeight]].\n */\n public readonly subScriptScale: number;\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\n * The offset is computed in meters as superScriptOffsetFactor * [[textHeight]].\n */\n public readonly superScriptOffsetFactor: number;\n /** Multiplier used to compute the height of a superscript [[TextRun]].\n * The height is computed as superScriptScale * [[textHeight]].\n */\n public readonly superScriptScale: number;\n /** Multiplier used to compute the width of each glyph, relative to [[textHeight]]. */\n public readonly widthFactor: number;\n /** Properties describing appearance of leaders in a [[TextAnnotation]].\n * Used when producing geometry for [[TextAnnotation]].\n */\n public readonly leader: Readonly<Required<TextLeaderStyleProps>>;\n /** The size (in meters) used to calculate the tab stops in a run.\n * These are equally spaced from the left edge of the TextBlock.\n * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\n */\n public readonly tabInterval: number;\n /** The offset (in meters) from the left edge of the text block to the start of the line of text.\n * In lists, the indentation is added to offset of list items.\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\n */\n public readonly indentation: number;\n /** The marker used to indicate the start of a list item.\n * Default: [[ListMarkerEnumerator.Number]].\n */\n public readonly listMarker: ListMarker;\n /** The frame settings of the [[TextAnnotation]]. */\n public readonly frame: Readonly<Required<TextFrameStyleProps>>;\n /** The margins to surround the document content. */\n public readonly margins: Readonly<Required<TextBlockMargins>>;\n /** The alignment of the text content. */\n public readonly justification: TextJustification;\n\n /** A fully-populated JSON representation of the default settings. A real `font` must be provided before use. */\n public static defaultProps: DeepReadonlyObject<DeepRequiredObject<TextStyleSettingsProps>> = {\n color: \"subcategory\",\n font: { name: \"\", type: FontType.TrueType },\n textHeight: 1,\n lineSpacingFactor: 0.5,\n paragraphSpacingFactor: 0.5,\n isBold: false,\n isItalic: false,\n isUnderlined: false,\n stackedFractionScale: 0.7,\n stackedFractionType: \"horizontal\",\n subScriptOffsetFactor: -0.15,\n subScriptScale: 2 / 3,\n superScriptOffsetFactor: 0.5,\n superScriptScale: 2 / 3,\n widthFactor: 1,\n leader: {\n color: \"inherit\",\n wantElbow: false,\n elbowLength: 1.0,\n terminatorShape: terminatorShapes[0],\n terminatorHeightFactor: 1.0,\n terminatorWidthFactor: 1.0,\n },\n tabInterval: 4,\n indentation: 0,\n listMarker: { enumerator: \"1\", terminator: \"period\", case: \"lower\" },\n frame: {\n shape: \"none\",\n fillColor: \"none\",\n borderColor: ColorDef.black.toJSON(),\n borderWeight: 1,\n },\n margins: {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n justification: \"left\",\n };\n\n /** Settings initialized to all default values. */\n public static defaults: TextStyleSettings = new TextStyleSettings({});\n\n private constructor(props: TextStyleSettingsProps, defaults?: Required<TextStyleSettingsProps>) {\n if (!defaults) {\n defaults = TextStyleSettings.defaultProps;\n }\n\n this.color = props.color ?? defaults.color;\n const font = {\n name: props.font?.name ?? defaults.font.name,\n type: props.font?.type ?? defaults.font.type,\n }\n this.font = Object.freeze(font) as Readonly<Required<FontFamilySelector>>;\n this.textHeight = props.textHeight ?? defaults.textHeight;\n this.lineSpacingFactor = props.lineSpacingFactor ?? defaults.lineSpacingFactor;\n this.paragraphSpacingFactor = props.paragraphSpacingFactor ?? defaults.paragraphSpacingFactor;\n this.isBold = props.isBold ?? defaults.isBold;\n this.isItalic = props.isItalic ?? defaults.isItalic;\n this.isUnderlined = props.isUnderlined ?? defaults.isUnderlined;\n this.stackedFractionScale = props.stackedFractionScale ?? defaults.stackedFractionScale;\n this.stackedFractionType = props.stackedFractionType ?? defaults.stackedFractionType;\n this.subScriptOffsetFactor = props.subScriptOffsetFactor ?? defaults.subScriptOffsetFactor;\n this.subScriptScale = props.subScriptScale ?? defaults.subScriptScale;\n this.superScriptOffsetFactor = props.superScriptOffsetFactor ?? defaults.superScriptOffsetFactor;\n this.superScriptScale = props.superScriptScale ?? defaults.superScriptScale;\n this.widthFactor = props.widthFactor ?? defaults.widthFactor;\n const leader = {\n color: props.leader?.color ?? defaults.leader.color,\n wantElbow: props.leader?.wantElbow ?? defaults.leader.wantElbow,\n elbowLength: props.leader?.elbowLength ?? defaults.leader.elbowLength,\n terminatorShape: props.leader?.terminatorShape ?? defaults.leader.terminatorShape,\n terminatorHeightFactor: props.leader?.terminatorHeightFactor ?? defaults.leader.terminatorHeightFactor,\n terminatorWidthFactor: props.leader?.terminatorWidthFactor ?? defaults.leader.terminatorWidthFactor,\n }\n this.leader = Object.freeze(leader) as Readonly<Required<TextLeaderStyleProps>>;\n this.tabInterval = props.tabInterval ?? defaults.tabInterval;\n this.indentation = props.indentation ?? defaults.indentation;\n this.listMarker = props.listMarker ?? defaults.listMarker;\n const frame = {\n shape: props.frame?.shape ?? defaults.frame.shape,\n fillColor: props.frame?.fillColor ?? defaults.frame.fillColor,\n borderColor: props.frame?.borderColor ?? defaults.frame.borderColor,\n borderWeight: props.frame?.borderWeight ?? defaults.frame.borderWeight,\n };\n // Cast to indicate to TypeScript that the frame properties are all defined\n this.frame = Object.freeze(frame) as Readonly<Required<TextFrameStyleProps>>;\n this.margins = Object.freeze({\n left: props.margins?.left ?? defaults.margins.left,\n right: props.margins?.right ?? defaults.margins.right,\n top: props.margins?.top ?? defaults.margins.top,\n bottom: props.margins?.bottom ?? defaults.margins.bottom,\n }) as Readonly<Required<TextBlockMargins>>;\n this.justification = props.justification ?? defaults.justification;\n }\n\n /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */\n public clone(alteredProps?: TextStyleSettingsProps): TextStyleSettings {\n return alteredProps ? new TextStyleSettings(alteredProps, this) : this;\n }\n\n /** Create settings from their JSON representation. */\n public static fromJSON(props?: TextStyleSettingsProps): TextStyleSettings {\n return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;\n }\n\n public toJSON(): TextStyleSettingsProps {\n return structuredClone(this);\n }\n\n /** Compare two [[TextLeaderStyleProps]] for equality.\n * @param other The other leader style properties to compare against.\n * @returns true if the two leader styles are equal, false otherwise.\n */\n public leaderEquals(other: TextLeaderStyleProps): boolean {\n return this.leader.color === other.color && this.leader.wantElbow === other.wantElbow\n && this.leader.elbowLength === other.elbowLength && this.leader.terminatorShape === other.terminatorShape && this.leader.terminatorHeightFactor === other.terminatorHeightFactor\n && this.leader.terminatorWidthFactor === other.terminatorWidthFactor;\n }\n\n public frameEquals(other: TextFrameStyleProps): boolean {\n return this.frame?.shape === other.shape\n && this.frame?.fillColor === other.fillColor\n && this.frame?.borderColor === other.borderColor\n && this.frame?.borderWeight === other.borderWeight;\n }\n\n public marginsEqual(other: TextBlockMargins): boolean {\n return Object.entries(this.margins).every(([key, value]) =>\n value === (other as any)[key]\n );\n }\n\n public equals(other: TextStyleSettings): boolean {\n return this.color === other.color && this.font.name === other.font.name && this.font.type === other.font.type\n && this.textHeight === other.textHeight && this.widthFactor === other.widthFactor\n && this.lineSpacingFactor === other.lineSpacingFactor && this.paragraphSpacingFactor === other.paragraphSpacingFactor\n && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined\n && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale\n && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale\n && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale\n && this.tabInterval === other.tabInterval && this.indentation === other.indentation\n && this.listMarker.case === other.listMarker.case && this.listMarker.enumerator === other.listMarker.enumerator && this.listMarker.terminator === other.listMarker.terminator\n && this.justification === other.justification\n && this.leaderEquals(other.leader)\n && this.frameEquals(other.frame)\n && this.marginsEqual(other.margins);\n }\n\n /**\n * Returns a list of validation errors for this instance.\n *\n * A TextStyleSettings object may contain values that are invalid in all contexts.\n * If this method returns any error strings, using the settings will likely result in rendering failures or runtime exceptions.\n *\n * This method only checks for universally invalid values. Additional domain-specific validation may be required depending on the context in which these settings are used.\n *\n * @returns An array of error strings describing the invalid values, or an empty array if the settings are valid.\n */\n public getValidationErrors(): string[] {\n const errorMessages: string[] = [];\n if (this.font.name.trim() === \"\") {\n errorMessages.push(\"font name must be provided\");\n }\n\n if (this.textHeight <= 0) {\n errorMessages.push(\"textHeight must be greater than 0\");\n }\n\n if (this.stackedFractionScale <= 0) {\n errorMessages.push(\"stackedFractionScale must be greater than 0\");\n }\n\n return errorMessages;\n }\n}\n\ndeepFreeze(TextStyleSettings.defaultProps);\ndeepFreeze(TextStyleSettings.defaults);"]}
|
|
1
|
+
{"version":3,"file":"TextStyle.js","sourceRoot":"","sources":["../../../src/annotation/TextStyle.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAGH,0CAAsD;AACtD,oCAAwD;AAExD;;;GAGG;AACH,IAAY,oBAUX;AAVD,WAAY,oBAAoB;IAC9B,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C,iBAAiB,CAAC,QAAQ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Annotation\r\n */\r\n\r\nimport { DeepReadonlyObject, DeepRequiredObject } from \"@itwin/core-bentley\";\r\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\r\nimport { FontFamilySelector, FontType } from \"../Fonts\";\r\n\r\n/** Predefined markers for list items in text annotations.\r\n * These values control the appearance of list item markers (e.g., bullet, circle, square, dash, number) that denote the start of a list item in a list.\r\n * @beta\r\n */\r\nexport enum ListMarkerEnumerator {\r\n /** English Alphabet */\r\n Letter = \"A\",\r\n RomanNumeral = \"I\",\r\n Number = \"1\",\r\n Bullet = \"•\",\r\n Circle = \"○\",\r\n Square = \"■\",\r\n /** EM Dash */\r\n Dash = \"–\",\r\n}\r\n\r\n/** A settings to specify how to mark or denote the start of a list item in a [[List]].\r\n * @beta\r\n */\r\nexport interface ListMarker {\r\n /** This can be either one of the predefined markers in [[ListMarkerEnumerator]], or any arbitrary string. */\r\n enumerator: ListMarkerEnumerator | string,\r\n /** The punctuation to follow the enumerator. */\r\n terminator?: \"parenthesis\" | \"period\",\r\n /** Whether to use upper or lower case for alphabetic or roman numeral enumerators. Ignored if [[enumerator]] is not alphabetic or roman numeral. */\r\n case?: \"upper\" | \"lower\",\r\n}\r\n\r\n/** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]\r\n * @beta\r\n*/\r\nexport const textAnnotationFrameShapes = [\"none\", \"line\", \"rectangle\", \"circle\", \"equilateralTriangle\", \"diamond\", \"square\", \"pentagon\", \"hexagon\", \"octagon\", \"capsule\", \"roundedRectangle\"] as const;\r\n\r\n/** Describes a predefined shape that can be computed and drawn around the margins of a [[TextBlock]]\r\n * @beta\r\n*/\r\nexport type TextAnnotationFrameShape = typeof textAnnotationFrameShapes[number];\r\n\r\n/** Set of predefined shapes that can be used as terminators for leaders in a [[TextAnnotation]]\r\n * @beta\r\n*/\r\nexport const terminatorShapes = [\"openArrow\", \"closedArrow\", \"closedArrowFilled\", \"circle\", \"circleFilled\", \"slash\", \"none\"] as const;\r\n\r\n/** Describes a predefined shape that can be used as a terminator for leaders in a [[TextAnnotation]]\r\n * @beta\r\n*/\r\nexport type TerminatorShape = typeof terminatorShapes[number];\r\n\r\n/**\r\n * Describes what color to use when filling the frame around a [[TextBlock]].\r\n * If `background` is specified, [[GeometryParams.BackgroundFill]] will be set to `BackgroundFill.Outline`.\r\n * If `none` is specified, no fill will be applied.\r\n * @beta\r\n */\r\nexport type TextAnnotationFillColor = TextStyleColor | \"background\" | \"none\";\r\n\r\n/** Describes the margins around the content inside a [[TextBlock]], measured in meters.\r\n * All margins default to zero if `undefined`.\r\n * @beta\r\n */\r\nexport interface TextBlockMargins {\r\n /** The left margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\r\n left?: number;\r\n /** The right margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\r\n right?: number;\r\n /** The top margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\r\n top?: number;\r\n /** The bottom margin measured in meters. Must be a positive number >= 0. Negative values are disregarded */\r\n bottom?: number;\r\n};\r\n\r\n/** Describes the relative alignment of text.\r\n * @beta\r\n*/\r\nexport type TextJustification = \"left\" | \"center\" | \"right\";\r\n\r\n/** Specifies how to separate the numerator and denominator of a [[FractionRun]], by either a horizontal or diagonal bar.\r\n * @see [[TextStyleSettingsProps.stackedFractionType]] and [[TextStyleSettings.stackedFractionType]].\r\n * @beta\r\n */\r\nexport type StackedFractionType = \"horizontal\" | \"diagonal\";\r\n\r\n/** Describes the color in which to draw the text in a [[TextRun]].\r\n * \"subcategory\" indicates that the text should be drawn using the color of the [SubCategory]($backend) specified by the [GeometryStream]($docs/learning/common/GeometryStream.md) hosting the\r\n * text.\r\n * @beta\r\n */\r\nexport type TextStyleColor = ColorDefProps | \"subcategory\";\r\n\r\n/**\r\n * Describes how to draw the frame around a [[TextAnnotation]].\r\n * The frame can be a simple line, a filled shape, or both.\r\n * If only a subset of properties are specified, the others will be set to their default value.\r\n * @beta\r\n */\r\nexport interface TextFrameStyleProps {\r\n /** Shape of the frame. Default: \"none\" */\r\n shape?: TextAnnotationFrameShape;\r\n /** The color to fill the shape of the text frame. This fill is applied using [[FillDisplay.Blanking]]. Default: \"none\" */\r\n fillColor?: TextAnnotationFillColor;\r\n /** The color of the text frame's outline. Default: black */\r\n borderColor?: TextStyleColor;\r\n /** This will be used to set the [[GeometryParams.weight]] property of the frame (in pixels). Default: 1px */\r\n borderWeight?: number;\r\n};\r\n\r\n/** Properties describing the appearance of [[TextAnnotationLeader]] in a [[TextAnnotation]].\r\n * Used when producing geometry for [[TextAnnotation]].\r\n * @beta\r\n */\r\nexport interface TextLeaderStyleProps {\r\n /** The color of the leader.\r\n * If `inherit` is specified, the [[TextAnnotationLeader]] will use the color specified in the parent [[TextStyleSettings]]`.\r\n * Default: \"inherit\".\r\n */\r\n color?: TextStyleColor | \"inherit\";\r\n /** Whether to use an elbow in the leader.\r\n * Default: false\r\n */\r\n wantElbow?: boolean;\r\n /** Multiplier used to compute length of the elbow in the leader.\r\n * The elbowLength is computed in meters as elbowLength * [[textHeight]].\r\n * Default: 1.0\r\n */\r\n elbowLength?: number;\r\n /**\r\n * The shape of the leader terminator.\r\n * Default:\"openArrow\"\r\n */\r\n terminatorShape?: TerminatorShape;\r\n /** Multiplier to compute height of the leader terminator.\r\n * The terminator height is computed in meters as terminatorHeight * [[textHeight]].\r\n * Default: 1.0\r\n */\r\n terminatorHeightFactor?: number;\r\n /** Multiplier to compute width of the leader terminator.\r\n * The terminator width is computed in meters as terminatorWidth * [[textHeight]].\r\n * Default: 1.0\r\n */\r\n terminatorWidthFactor?: number;\r\n}\r\n\r\n/** Serves both as the JSON representation of a [[TextStyleSettings]], and a way for a [[TextBlockComponent]] to selectively override aspects of a [AnnotationTextStyle]($backend)'s properties.\r\n * @beta\r\n */\r\nexport interface TextStyleSettingsProps {\r\n /** The color of the text.\r\n * Default: \"subcategory\".\r\n */\r\n color?: TextStyleColor;\r\n /** The font stored in an iModel, used to draw the contents of a [[TextRun]].\r\n * Default: { name: \"\" } (an invalid font name).\r\n */\r\n font?: FontFamilySelector;\r\n /** The height of the text, in meters. Many other settings use the text height as the basis for computing their own values.\r\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as textHeight * [[subScriptScale]] and\r\n * textHeight * [[subScriptOffsetFactor]], respectively.\r\n * Default: 1.0. */\r\n textHeight?: number;\r\n /** Multiplier used to compute the vertical distance between two lines of text.\r\n * The distance is computed in meters as lineSpacingFactor * [[textHeight]].\r\n * Default: 0.5.\r\n */\r\n lineSpacingFactor?: number;\r\n /** Multiplier used to compute the vertical distance between two paragraphs of text.\r\n * The distance is computed in meters as paragraphSpacingFactor * [[textHeight]].\r\n * Default: 0.5.\r\n */\r\n paragraphSpacingFactor?: number;\r\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**.\r\n * Default: false.\r\n */\r\n isBold?: boolean;\r\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*.\r\n * Default: false.\r\n */\r\n isItalic?: boolean;\r\n /** Specifies whether the content of a [[TextRun]] should be underlined.\r\n * Default: false.\r\n */\r\n isUnderlined?: boolean;\r\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\r\n * The height is computed in meters as stackedFractionScale * [[textHeight]].\r\n * Default: 0.7.\r\n */\r\n stackedFractionScale?: number;\r\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]].\r\n * Default: \"horizontal\".\r\n */\r\n stackedFractionType?: StackedFractionType;\r\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\r\n * The offset is computed in meters as subScriptOffsetFactor * [[textHeight]].\r\n * Default: -0.15.\r\n */\r\n subScriptOffsetFactor?: number;\r\n /** Multiplier used to compute the height of a subscript [[TextRun]].\r\n * The height is computed as subScriptScale * [[textHeight]].\r\n * Default: 2/3\r\n */\r\n subScriptScale?: number;\r\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\r\n * The offset is computed in meters as superScriptOffsetFactor * [[textHeight]].\r\n * Default: -0.5.\r\n */\r\n superScriptOffsetFactor?: number;\r\n /** Multiplier used to compute the height of a superscript [[TextRun]].\r\n * The height is computed as superScriptScale * [[textHeight]].\r\n * Default: 2/3\r\n */\r\n superScriptScale?: number;\r\n /** A scale applied to the width of each glyph.\r\n * Default: 1.0\r\n */\r\n widthFactor?: number;\r\n\r\n /** Properties describing appearance of leaders in a [[TextAnnotation]]\r\n * Used when producing geometry for [[TextAnnotation]]\r\n * Default: {color:\"subcategory\", wantElbow:\"false\",elbowLength:1, terminatorShape:\"openArrow\",terminatorWidthFactor:1, terminatorHeightFactor:1}.\r\n */\r\n leader?: TextLeaderStyleProps;\r\n /** The size (in meters) used to calculate the tab stops in a run.\r\n * These are equally spaced from the left edge of the TextBlock.\r\n * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].\r\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\r\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\r\n * Default: 4 meters.\r\n */\r\n tabInterval?: number;\r\n /**\r\n * A description of the frame around the text annotation.\r\n * Used when producing geometry for [[TextAnnotation]]s.\r\n * Default: {shape: \"none\", fill: \"none\", border: black, borderWeight: 1} for no frame.\r\n */\r\n frame?: TextFrameStyleProps;\r\n /** The margins to surround the document content.\r\n * Default: 0 margins on all sides */\r\n margins?: TextBlockMargins;\r\n /** The offset (in meters) from the left edge of the text block to the start of the line of text.\r\n * In lists, the indentation is added to offset of list items.\r\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\r\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\r\n * Default: 0 meters.\r\n */\r\n indentation?: number;\r\n /** The marker used to indicate the start of a list item.\r\n * Default: \"1.\".\r\n */\r\n listMarker?: ListMarker;\r\n /** The alignment of the text content.\r\n * Default: \"left\". */\r\n justification?: TextJustification;\r\n}\r\n\r\nfunction deepFreeze<T>(obj: T) {\r\n if (obj === null || typeof obj !== \"object\" || Object.isFrozen(obj))\r\n return;\r\n Object.getOwnPropertyNames(obj).forEach((prop) => {\r\n const value = (obj as any)[prop];\r\n if (value && typeof value === \"object\") {\r\n deepFreeze(value);\r\n }\r\n });\r\n Object.freeze(obj);\r\n}\r\n\r\n/** A description of the formatting to be applied to a [[TextBlockComponent]].\r\n * Named instances of these settings can be stored as [AnnotationTextStyle]($backend)s in an iModel.\r\n * @note This is an immutable type. Use [[clone]] to create a modified copy.\r\n * @see [[TextStyleSettingsProps]] for documentation of each of the settings.\r\n * @beta\r\n */\r\nexport class TextStyleSettings {\r\n /** The color of the text. */\r\n public readonly color: TextStyleColor;\r\n /** The font stored in an iModel, used to draw the contents of a [[TextRun]].\r\n */\r\n public readonly font: Readonly<Required<FontFamilySelector>>;\r\n /** The height of the text, in meters. Many other settings use the text height as the basis for computing their own values.\r\n * For example, the height and offset from baseline of a subscript [[TextRun]] are computed as textHeight * [[subScriptScale]] and\r\n * textHeight * [[subScriptOffsetFactor]], respectively.\r\n */\r\n public readonly textHeight: number;\r\n /** Multiplier used to compute the vertical distance between two lines of text.\r\n * The distance is computed in meters as lineSpacingFactor * [[textHeight]] of the [[TextBlock]].\r\n */\r\n public readonly lineSpacingFactor: number;\r\n /** Multiplier used to compute the vertical distance between two paragraphs of text.\r\n * The distance is computed in meters as paragraphSpacingFactor * the [[TextBlock]]'s [[textHeight]].\r\n */\r\n public readonly paragraphSpacingFactor: number;\r\n /** Specifies whether the content of a [[TextRun]] should be rendered **bold**. */\r\n public readonly isBold: boolean;\r\n /** Specifies whether the content of a [[TextRun]] should be rendered in *italics*. */\r\n public readonly isItalic: boolean;\r\n /** Specifies whether the content of a [[TextRun]] should be underlined. */\r\n public readonly isUnderlined: boolean;\r\n /** Multiplier used to compute the height of both the numerator and denominator of a [[FractionRun]].\r\n * The height is computed in meters as stackedFractionScale * [[textHeight]].\r\n */\r\n public readonly stackedFractionScale: number;\r\n /** Specifies how to separate the numerator and denominator of a [[FractionRun]]. */\r\n public readonly stackedFractionType: StackedFractionType;\r\n /** Multiplier used to compute the vertical offset from the baseline for a subscript [[TextRun]].\r\n * The offset is computed in meters as subScriptOffsetFactor * [[textHeight]].\r\n */\r\n public readonly subScriptOffsetFactor: number;\r\n /** Multiplier used to compute the height of a subscript [[TextRun]].\r\n * The height is computed as subScriptScale * [[textHeight]].\r\n */\r\n public readonly subScriptScale: number;\r\n /** Multiplier used to compute the vertical offset from the baseline for a super [[TextRun]].\r\n * The offset is computed in meters as superScriptOffsetFactor * [[textHeight]].\r\n */\r\n public readonly superScriptOffsetFactor: number;\r\n /** Multiplier used to compute the height of a superscript [[TextRun]].\r\n * The height is computed as superScriptScale * [[textHeight]].\r\n */\r\n public readonly superScriptScale: number;\r\n /** Multiplier used to compute the width of each glyph, relative to [[textHeight]]. */\r\n public readonly widthFactor: number;\r\n /** Properties describing appearance of leaders in a [[TextAnnotation]].\r\n * Used when producing geometry for [[TextAnnotation]].\r\n */\r\n public readonly leader: Readonly<Required<TextLeaderStyleProps>>;\r\n /** The size (in meters) used to calculate the tab stops in a run.\r\n * These are equally spaced from the left edge of the TextBlock.\r\n * [[tabInterval]] is also used in lists to compute the offset of each child or [[Paragraph]].\r\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\r\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\r\n */\r\n public readonly tabInterval: number;\r\n /** The offset (in meters) from the left edge of the text block to the start of the line of text.\r\n * In lists, the indentation is added to offset of list items.\r\n * The [[listMarker]] is right justified on [[indentation]] + [[tabInterval]]*(depth - 1/2).\r\n * [[Paragraph]]s will start at [[indentation]] + [[tabInterval]]*depth.\r\n */\r\n public readonly indentation: number;\r\n /** The marker used to indicate the start of a list item.\r\n * Default: [[ListMarkerEnumerator.Number]].\r\n */\r\n public readonly listMarker: ListMarker;\r\n /** The frame settings of the [[TextAnnotation]]. */\r\n public readonly frame: Readonly<Required<TextFrameStyleProps>>;\r\n /** The margins to surround the document content. */\r\n public readonly margins: Readonly<Required<TextBlockMargins>>;\r\n /** The alignment of the text content. */\r\n public readonly justification: TextJustification;\r\n\r\n /** A fully-populated JSON representation of the default settings. A real `font` must be provided before use. */\r\n public static defaultProps: DeepReadonlyObject<DeepRequiredObject<TextStyleSettingsProps>> = {\r\n color: \"subcategory\",\r\n font: { name: \"\", type: FontType.TrueType },\r\n textHeight: 1,\r\n lineSpacingFactor: 0.5,\r\n paragraphSpacingFactor: 0.5,\r\n isBold: false,\r\n isItalic: false,\r\n isUnderlined: false,\r\n stackedFractionScale: 0.7,\r\n stackedFractionType: \"horizontal\",\r\n subScriptOffsetFactor: -0.15,\r\n subScriptScale: 2 / 3,\r\n superScriptOffsetFactor: 0.5,\r\n superScriptScale: 2 / 3,\r\n widthFactor: 1,\r\n leader: {\r\n color: \"inherit\",\r\n wantElbow: false,\r\n elbowLength: 1.0,\r\n terminatorShape: terminatorShapes[0],\r\n terminatorHeightFactor: 1.0,\r\n terminatorWidthFactor: 1.0,\r\n },\r\n tabInterval: 4,\r\n indentation: 0,\r\n listMarker: { enumerator: \"1\", terminator: \"period\", case: \"lower\" },\r\n frame: {\r\n shape: \"none\",\r\n fillColor: \"none\",\r\n borderColor: ColorDef.black.toJSON(),\r\n borderWeight: 1,\r\n },\r\n margins: {\r\n left: 0,\r\n right: 0,\r\n top: 0,\r\n bottom: 0\r\n },\r\n justification: \"left\",\r\n };\r\n\r\n /** Settings initialized to all default values. */\r\n public static defaults: TextStyleSettings = new TextStyleSettings({});\r\n\r\n private constructor(props: TextStyleSettingsProps, defaults?: Required<TextStyleSettingsProps>) {\r\n if (!defaults) {\r\n defaults = TextStyleSettings.defaultProps;\r\n }\r\n\r\n this.color = props.color ?? defaults.color;\r\n const font = {\r\n name: props.font?.name ?? defaults.font.name,\r\n type: props.font?.type ?? defaults.font.type,\r\n }\r\n this.font = Object.freeze(font) as Readonly<Required<FontFamilySelector>>;\r\n this.textHeight = props.textHeight ?? defaults.textHeight;\r\n this.lineSpacingFactor = props.lineSpacingFactor ?? defaults.lineSpacingFactor;\r\n this.paragraphSpacingFactor = props.paragraphSpacingFactor ?? defaults.paragraphSpacingFactor;\r\n this.isBold = props.isBold ?? defaults.isBold;\r\n this.isItalic = props.isItalic ?? defaults.isItalic;\r\n this.isUnderlined = props.isUnderlined ?? defaults.isUnderlined;\r\n this.stackedFractionScale = props.stackedFractionScale ?? defaults.stackedFractionScale;\r\n this.stackedFractionType = props.stackedFractionType ?? defaults.stackedFractionType;\r\n this.subScriptOffsetFactor = props.subScriptOffsetFactor ?? defaults.subScriptOffsetFactor;\r\n this.subScriptScale = props.subScriptScale ?? defaults.subScriptScale;\r\n this.superScriptOffsetFactor = props.superScriptOffsetFactor ?? defaults.superScriptOffsetFactor;\r\n this.superScriptScale = props.superScriptScale ?? defaults.superScriptScale;\r\n this.widthFactor = props.widthFactor ?? defaults.widthFactor;\r\n const leader = {\r\n color: props.leader?.color ?? defaults.leader.color,\r\n wantElbow: props.leader?.wantElbow ?? defaults.leader.wantElbow,\r\n elbowLength: props.leader?.elbowLength ?? defaults.leader.elbowLength,\r\n terminatorShape: props.leader?.terminatorShape ?? defaults.leader.terminatorShape,\r\n terminatorHeightFactor: props.leader?.terminatorHeightFactor ?? defaults.leader.terminatorHeightFactor,\r\n terminatorWidthFactor: props.leader?.terminatorWidthFactor ?? defaults.leader.terminatorWidthFactor,\r\n }\r\n this.leader = Object.freeze(leader) as Readonly<Required<TextLeaderStyleProps>>;\r\n this.tabInterval = props.tabInterval ?? defaults.tabInterval;\r\n this.indentation = props.indentation ?? defaults.indentation;\r\n this.listMarker = props.listMarker ?? defaults.listMarker;\r\n const frame = {\r\n shape: props.frame?.shape ?? defaults.frame.shape,\r\n fillColor: props.frame?.fillColor ?? defaults.frame.fillColor,\r\n borderColor: props.frame?.borderColor ?? defaults.frame.borderColor,\r\n borderWeight: props.frame?.borderWeight ?? defaults.frame.borderWeight,\r\n };\r\n // Cast to indicate to TypeScript that the frame properties are all defined\r\n this.frame = Object.freeze(frame) as Readonly<Required<TextFrameStyleProps>>;\r\n this.margins = Object.freeze({\r\n left: props.margins?.left ?? defaults.margins.left,\r\n right: props.margins?.right ?? defaults.margins.right,\r\n top: props.margins?.top ?? defaults.margins.top,\r\n bottom: props.margins?.bottom ?? defaults.margins.bottom,\r\n }) as Readonly<Required<TextBlockMargins>>;\r\n this.justification = props.justification ?? defaults.justification;\r\n }\r\n\r\n /** Create a copy of these settings, modified according to the properties defined by `alteredProps`. */\r\n public clone(alteredProps?: TextStyleSettingsProps): TextStyleSettings {\r\n return alteredProps ? new TextStyleSettings(alteredProps, this) : this;\r\n }\r\n\r\n /** Create settings from their JSON representation. */\r\n public static fromJSON(props?: TextStyleSettingsProps): TextStyleSettings {\r\n return props ? new TextStyleSettings(props) : TextStyleSettings.defaults;\r\n }\r\n\r\n public toJSON(): TextStyleSettingsProps {\r\n return structuredClone(this);\r\n }\r\n\r\n /** Compare two [[TextLeaderStyleProps]] for equality.\r\n * @param other The other leader style properties to compare against.\r\n * @returns true if the two leader styles are equal, false otherwise.\r\n */\r\n public leaderEquals(other: TextLeaderStyleProps): boolean {\r\n return this.leader.color === other.color && this.leader.wantElbow === other.wantElbow\r\n && this.leader.elbowLength === other.elbowLength && this.leader.terminatorShape === other.terminatorShape && this.leader.terminatorHeightFactor === other.terminatorHeightFactor\r\n && this.leader.terminatorWidthFactor === other.terminatorWidthFactor;\r\n }\r\n\r\n public frameEquals(other: TextFrameStyleProps): boolean {\r\n return this.frame?.shape === other.shape\r\n && this.frame?.fillColor === other.fillColor\r\n && this.frame?.borderColor === other.borderColor\r\n && this.frame?.borderWeight === other.borderWeight;\r\n }\r\n\r\n public marginsEqual(other: TextBlockMargins): boolean {\r\n return Object.entries(this.margins).every(([key, value]) =>\r\n value === (other as any)[key]\r\n );\r\n }\r\n\r\n public equals(other: TextStyleSettings): boolean {\r\n return this.color === other.color && this.font.name === other.font.name && this.font.type === other.font.type\r\n && this.textHeight === other.textHeight && this.widthFactor === other.widthFactor\r\n && this.lineSpacingFactor === other.lineSpacingFactor && this.paragraphSpacingFactor === other.paragraphSpacingFactor\r\n && this.isBold === other.isBold && this.isItalic === other.isItalic && this.isUnderlined === other.isUnderlined\r\n && this.stackedFractionType === other.stackedFractionType && this.stackedFractionScale === other.stackedFractionScale\r\n && this.subScriptOffsetFactor === other.subScriptOffsetFactor && this.subScriptScale === other.subScriptScale\r\n && this.superScriptOffsetFactor === other.superScriptOffsetFactor && this.superScriptScale === other.superScriptScale\r\n && this.tabInterval === other.tabInterval && this.indentation === other.indentation\r\n && this.listMarker.case === other.listMarker.case && this.listMarker.enumerator === other.listMarker.enumerator && this.listMarker.terminator === other.listMarker.terminator\r\n && this.justification === other.justification\r\n && this.leaderEquals(other.leader)\r\n && this.frameEquals(other.frame)\r\n && this.marginsEqual(other.margins);\r\n }\r\n\r\n /**\r\n * Returns a list of validation errors for this instance.\r\n *\r\n * A TextStyleSettings object may contain values that are invalid in all contexts.\r\n * If this method returns any error strings, using the settings will likely result in rendering failures or runtime exceptions.\r\n *\r\n * This method only checks for universally invalid values. Additional domain-specific validation may be required depending on the context in which these settings are used.\r\n *\r\n * @returns An array of error strings describing the invalid values, or an empty array if the settings are valid.\r\n */\r\n public getValidationErrors(): string[] {\r\n const errorMessages: string[] = [];\r\n if (this.font.name.trim() === \"\") {\r\n errorMessages.push(\"font name must be provided\");\r\n }\r\n\r\n if (this.textHeight <= 0) {\r\n errorMessages.push(\"textHeight must be greater than 0\");\r\n }\r\n\r\n if (this.stackedFractionScale <= 0) {\r\n errorMessages.push(\"stackedFractionScale must be greater than 0\");\r\n }\r\n\r\n return errorMessages;\r\n }\r\n}\r\n\r\ndeepFreeze(TextStyleSettings.defaultProps);\r\ndeepFreeze(TextStyleSettings.defaults);"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,kDAAgC;AAChC,8DAA4C;AAC5C,yDAAuC;AACvC,sEAAoD;AACpD,qEAAmD;AACnD,yDAAuC;AACvC,yDAAuC;AACvC,+CAA6B;AAC7B,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACjC,2CAAyB;AACzB,kDAAgC;AAChC,oDAAkC;AAClC,oDAAkC;AAClC,mDAAiC;AACjC,8CAA4B;AAC5B,yCAAuB;AACvB,gDAA8B;AAC9B,6CAA2B;AAC3B,yDAAuC;AACvC,wDAAsC;AACtC,yDAAuC;AACvC,mEAAiD;AACjD,gEAA8C;AAC9C,kDAAgC;AAChC,+CAA6B;AAC7B,gDAA8B;AAC9B,iDAA+B;AAC/B,2DAAyC;AACzC,gDAA8B;AAC9B,oDAAkC;AAClC,gDAA8B;AAC9B,iDAA+B;AAC/B,qDAAmC;AACnC,iDAA+B;AAC/B,0CAAwB;AACxB,4CAA0B;AAC1B,0DAAwC;AACxC,0DAAwC;AACxC,iEAA+C;AAC/C,yDAAuC;AACvC,4DAA0C;AAC1C,0DAAwC;AACxC,uEAAqD;AACrD,6DAA2C;AAC3C,2DAAyC;AACzC,2DAAyC;AACzC,+DAA6C;AAC7C,4DAA0C;AAC1C,0DAAwC;AACxC,uDAAqC;AACrC,uDAAqC;AACrC,wDAAsC;AACtC,wDAAsC;AACtC,wDAAsC;AACtC,mDAAiC;AACjC,oDAAkC;AAClC,6CAA2B;AAC3B,kDAAgC;AAChC,gDAA8B;AAC9B,+CAA6B;AAC7B,2CAAyB;AACzB,6CAA2B;AAC3B,6CAA2B;AAC3B,0CAAwB;AACxB,2CAAyB;AACzB,gDAA8B;AAC9B,kDAAgC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C;AAClC,sDAAoC;AACpC,oDAAkC;AAClC,gDAA8B;AAC9B,sDAAoC;AACpC,yDAAuC;AACvC,iEAA+C;AAE/C,2DAAyC;AAEzC;;GAEG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nexport * from \"./AmbientOcclusion\";\nexport * from \"./AnalysisStyle\";\nexport * from \"./annotation/TextAnnotation\";\nexport * from \"./annotation/TextBlock\";\nexport * from \"./annotation/TextBlockGeometryProps\";\nexport * from \"./annotation/TextBlockLayoutResult\";\nexport * from \"./annotation/TextField\";\nexport * from \"./annotation/TextStyle\";\nexport * from \"./Atmosphere\";\nexport * from \"./AuthorizationClient\";\nexport * from \"./BackgroundMapProvider\";\nexport * from \"./BackgroundMapSettings\";\nexport * from \"./Base64EncodedString\";\nexport * from \"./BriefcaseTypes\";\nexport * from \"./Camera\";\nexport * from \"./CatalogIModel\";\nexport * from \"./ChangedElements\";\nexport * from \"./ChangedEntities\";\nexport * from \"./ChangesetProps\";\nexport * from \"./ClipStyle\";\nexport * from \"./Code\";\nexport * from \"./ColorByName\";\nexport * from \"./ColorDef\";\nexport * from \"./CommonLoggerCategory\";\nexport * from \"./ContextRealityModel\";\nexport * from \"./DisplayStyleSettings\";\nexport * from \"./domains/FunctionalElementProps\";\nexport * from \"./domains/GenericElementProps\";\nexport * from \"./ECSchemaProps\";\nexport * from \"./ECSqlTypes\";\nexport * from \"./ElementMesh\";\nexport * from \"./ElementProps\";\nexport * from \"./EmphasizeElementsProps\";\nexport * from \"./EntityProps\";\nexport * from \"./EntityReference\";\nexport * from \"./Environment\";\nexport * from \"./FeatureIndex\";\nexport * from \"./FeatureSymbology\";\nexport * from \"./FeatureTable\";\nexport * from \"./Fonts\";\nexport * from \"./Frustum\";\nexport * from \"./GenericInstanceFilter\";\nexport * from \"./GeoCoordinateServices\";\nexport * from \"./geometry/AdditionalTransform\";\nexport * from \"./geometry/AreaPattern\";\nexport * from \"./geometry/BoundingSphere\";\nexport * from \"./geometry/Cartographic\";\nexport * from \"./geometry/CoordinateReferenceSystem\";\nexport * from \"./geometry/ElementGeometry\";\nexport * from \"./geometry/FrustumPlanes\";\nexport * from \"./geometry/GeodeticDatum\";\nexport * from \"./geometry/GeodeticEllipsoid\";\nexport * from \"./geometry/GeometryStream\";\nexport * from \"./geometry/ImageGraphic\";\nexport * from \"./geometry/LineStyle\";\nexport * from \"./geometry/Placement\";\nexport * from \"./geometry/Projection\";\nexport * from \"./geometry/TextString\";\nexport * from \"./GeometryContainment\";\nexport * from \"./GeometryParams\";\nexport * from \"./GeometrySummary\";\nexport * from \"./Gradient\";\nexport * from \"./GraphicParams\";\nexport * from \"./GroundPlane\";\nexport * from \"./HiddenLine\";\nexport * from \"./Hilite\";\nexport * from \"./HSLColor\";\nexport * from \"./HSVColor\";\nexport * from \"./Image\";\nexport * from \"./IModel\";\nexport * from \"./IModelError\";\nexport * from \"./IModelVersion\";\nexport * from \"./ITwinCoreErrors\";\nexport * from \"./ipc/IpcSocket\";\nexport * from \"./ipc/IpcWebSocket\";\nexport * from \"./ipc/IpcWebSocketTransport\";\nexport * from \"./ipc/IpcSession\";\nexport * from \"./IpcAppProps\";\nexport * from \"./LightSettings\";\nexport * from \"./LinePixels\";\nexport * from \"./Localization\";\nexport * from \"./MapImagerySettings\";\nexport * from \"./MapLayerSettings\";\nexport * from \"./MassProperties\";\nexport * from \"./MaterialProps\";\nexport * from \"./ModelClipGroup\";\nexport * from \"./ModelProps\";\nexport * from \"./NativeAppProps\";\nexport * from \"./OctEncodedNormal\";\nexport * from \"./ConcurrentQuery\";\nexport * from \"./ECSqlReader\";\nexport * from \"./PlanarClipMask\";\nexport * from \"./ModelGeometryChanges\";\nexport * from \"./PlanProjectionSettings\";\nexport * from \"./QPoint\";\nexport * from \"./RealityDataAccessProps\";\nexport * from \"./RealityModelDisplaySettings\";\nexport * from \"./RenderPolyline\";\nexport * from \"./RenderMaterial\";\nexport * from \"./RenderSchedule\";\nexport * from \"./RenderTexture\";\nexport * from \"./RgbColor\";\nexport * from \"./RpcManager\";\nexport * from \"./SessionProps\";\nexport * from \"./SkyBox\";\nexport * from \"./SolarCalculate\";\nexport * from \"./SolarShadows\";\nexport * from \"./SpatialClassification\";\nexport * from \"./SubCategoryAppearance\";\nexport * from \"./SubCategoryOverride\";\nexport * from \"./CesiumIonAssets\";\nexport * from \"./TerrainSettings\";\nexport * from \"./TextureMapping\";\nexport * from \"./TextureProps\";\nexport * from \"./ThematicDisplay\";\nexport * from \"./ContourDisplay\";\nexport * from \"./Thumbnail\";\nexport * from \"./TileProps\";\nexport * from \"./Tween\";\nexport * from \"./TxnAction\";\nexport * from \"./ViewDetails\";\nexport * from \"./ViewFlags\";\nexport * from \"./ViewProps\";\nexport * from \"./rpc/core/RpcConstants\";\nexport * from \"./rpc/core/RpcControl\";\nexport * from \"./rpc/core/RpcInvocation\";\nexport * from \"./rpc/core/RpcSessionInvocation\";\nexport * from \"./rpc/core/RpcMarshaling\";\nexport * from \"./rpc/core/RpcOperation\";\nexport * from \"./rpc/core/RpcPendingQueue\";\nexport * from \"./rpc/core/RpcProtocol\";\nexport * from \"./rpc/core/RpcRegistry\";\nexport * from \"./rpc/core/RpcRequest\";\nexport * from \"./rpc/core/RpcRequestContext\";\nexport * from \"./rpc/core/RpcRoutingToken\";\nexport * from \"./rpc/core/RpcPush\";\nexport * from \"./rpc/core/RpcConfiguration\";\nexport * from \"./rpc/DevToolsRpcInterface\";\nexport * from \"./rpc/IModelReadRpcInterface\";\nexport * from \"./rpc/IModelTileRpcInterface\";\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\nexport * from \"./rpc/TestRpcManager\";\nexport * from \"./RpcInterface\";\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\nexport * from \"./rpc/web/OpenAPI\";\nexport * from \"./rpc/web/RpcMultipart\";\nexport * from \"./rpc/web/WebAppRpcProtocol\";\nexport * from \"./rpc/web/WebAppRpcRequest\";\nexport * from \"./rpc/web/WebAppRpcLogging\";\nexport * from \"./tile/B3dmTileIO\";\nexport * from \"./tile/CompositeTileIO\";\nexport * from \"./tile/ElementGraphics\";\nexport * from \"./tile/GltfTileIO\";\nexport * from \"./tile/I3dmTileIO\";\nexport * from \"./tile/IModelTileIO\";\nexport * from \"./tile/PntsTileIO\";\nexport * from \"./tile/TileIO\";\nexport * from \"./tile/TileMetadata\";\nexport * from \"./tile/Tileset3dSchema\";\nexport * from \"./WhiteOnWhiteReversalSettings\";\n\nexport * from \"./internal/cross-package\";\n\n/** @docs-package-description\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\n */\n/**\n * @docs-group-description Entities\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\n */\n/**\n * @docs-group-description Codes\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\n */\n/**\n * @docs-group-description Geometry\n * Types for working with geometry.\n */\n/**\n * @docs-group-description Serialization\n * Types for serializing geometry\n */\n/**\n * @docs-group-description Views\n * Types for defining graphical views of the contents of an iModel.\n */\n/**\n * @docs-group-description DisplayStyles\n * Types for describing how the contents of Views should be rendered.\n */\n/**\n * @docs-group-description Rendering\n * Types describing geometry, views, and symbology for consumption by a display system.\n */\n/**\n * @docs-group-description Symbology\n * Types that define the appearance of geometry.\n */\n/**\n * @docs-group-description iModels\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\n */\n/**\n * @docs-group-description RpcInterface\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\n */\n/**\n * @docs-group-description IpcSocket\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\n */\n/**\n * @docs-group-description ECSQL\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\n */\n/**\n * @docs-group-description Logging\n * Logger categories used by this package.\n */\n/**\n * @docs-group-description CloudStorage\n * Types for working with Cloud Storage.\n */\n/**\n * @docs-group-description Tween\n * Tweening library adapted from tween.js.\n */\n/**\n * @docs-group-description Tile\n * Types for working with 3d tile formats.\n */\n/**\n * @docs-group-description Utils\n * Miscellaneous utility classes.\n */\n/**\n * @docs-group-description NativeApp\n * [Native applications]($docs/learning/NativeApps.md)\n */\n/**\n * @docs-group-description Localization\n * Classes for internationalization and localization of your app.\n */\n/**\n * @docs-group-description Authorization\n * Classes for managing AccessToken used for all requests in other classes.\n */\n/**\n * @docs-group-description RealityData\n * Types for working with the RealityData API.\n */\n/**\n * @docs-group-description MapLayers\n * Types for working with the MapLayers API.\n */\n/**\n * @docs-group-description Annotation\n * APIs for producing and manipulating annotations like text, dimensions, and labels.\n */\n"]}
|
|
1
|
+
{"version":3,"file":"core-common.js","sourceRoot":"","sources":["../../src/core-common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,qDAAmC;AACnC,kDAAgC;AAChC,8DAA4C;AAC5C,yDAAuC;AACvC,sEAAoD;AACpD,qEAAmD;AACnD,yDAAuC;AACvC,yDAAuC;AACvC,+CAA6B;AAC7B,wDAAsC;AACtC,0DAAwC;AACxC,0DAAwC;AACxC,wDAAsC;AACtC,mDAAiC;AACj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AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nexport * from \"./AmbientOcclusion\";\r\nexport * from \"./AnalysisStyle\";\r\nexport * from \"./annotation/TextAnnotation\";\r\nexport * from \"./annotation/TextBlock\";\r\nexport * from \"./annotation/TextBlockGeometryProps\";\r\nexport * from \"./annotation/TextBlockLayoutResult\";\r\nexport * from \"./annotation/TextField\";\r\nexport * from \"./annotation/TextStyle\";\r\nexport * from \"./Atmosphere\";\r\nexport * from \"./AuthorizationClient\";\r\nexport * from \"./BackgroundMapProvider\";\r\nexport * from \"./BackgroundMapSettings\";\r\nexport * from \"./Base64EncodedString\";\r\nexport * from \"./BriefcaseTypes\";\r\nexport * from \"./Camera\";\r\nexport * from \"./CatalogIModel\";\r\nexport * from \"./ChangedElements\";\r\nexport * from \"./ChangedEntities\";\r\nexport * from \"./ChangesetProps\";\r\nexport * from \"./ClipStyle\";\r\nexport * from \"./Code\";\r\nexport * from \"./ColorByName\";\r\nexport * from \"./ColorDef\";\r\nexport * from \"./CommonLoggerCategory\";\r\nexport * from \"./ContextRealityModel\";\r\nexport * from \"./DisplayStyleSettings\";\r\nexport * from \"./domains/FunctionalElementProps\";\r\nexport * from \"./domains/GenericElementProps\";\r\nexport * from \"./ECSchemaProps\";\r\nexport * from \"./ECSqlTypes\";\r\nexport * from \"./ElementMesh\";\r\nexport * from \"./ElementProps\";\r\nexport * from \"./EmphasizeElementsProps\";\r\nexport * from \"./EntityProps\";\r\nexport * from \"./EntityReference\";\r\nexport * from \"./Environment\";\r\nexport * from \"./FeatureIndex\";\r\nexport * from \"./FeatureSymbology\";\r\nexport * from \"./FeatureTable\";\r\nexport * from \"./Fonts\";\r\nexport * from \"./Frustum\";\r\nexport * from \"./GenericInstanceFilter\";\r\nexport * from \"./GeoCoordinateServices\";\r\nexport * from \"./geometry/AdditionalTransform\";\r\nexport * from \"./geometry/AreaPattern\";\r\nexport * from \"./geometry/BoundingSphere\";\r\nexport * from \"./geometry/Cartographic\";\r\nexport * from \"./geometry/CoordinateReferenceSystem\";\r\nexport * from \"./geometry/ElementGeometry\";\r\nexport * from \"./geometry/FrustumPlanes\";\r\nexport * from \"./geometry/GeodeticDatum\";\r\nexport * from \"./geometry/GeodeticEllipsoid\";\r\nexport * from \"./geometry/GeometryStream\";\r\nexport * from \"./geometry/ImageGraphic\";\r\nexport * from \"./geometry/LineStyle\";\r\nexport * from \"./geometry/Placement\";\r\nexport * from \"./geometry/Projection\";\r\nexport * from \"./geometry/TextString\";\r\nexport * from \"./GeometryContainment\";\r\nexport * from \"./GeometryParams\";\r\nexport * from \"./GeometrySummary\";\r\nexport * from \"./Gradient\";\r\nexport * from \"./GraphicParams\";\r\nexport * from \"./GroundPlane\";\r\nexport * from \"./HiddenLine\";\r\nexport * from \"./Hilite\";\r\nexport * from \"./HSLColor\";\r\nexport * from \"./HSVColor\";\r\nexport * from \"./Image\";\r\nexport * from \"./IModel\";\r\nexport * from \"./IModelError\";\r\nexport * from \"./IModelVersion\";\r\nexport * from \"./ITwinCoreErrors\";\r\nexport * from \"./ipc/IpcSocket\";\r\nexport * from \"./ipc/IpcWebSocket\";\r\nexport * from \"./ipc/IpcWebSocketTransport\";\r\nexport * from \"./ipc/IpcSession\";\r\nexport * from \"./IpcAppProps\";\r\nexport * from \"./LightSettings\";\r\nexport * from \"./LinePixels\";\r\nexport * from \"./Localization\";\r\nexport * from \"./MapImagerySettings\";\r\nexport * from \"./MapLayerSettings\";\r\nexport * from \"./MassProperties\";\r\nexport * from \"./MaterialProps\";\r\nexport * from \"./ModelClipGroup\";\r\nexport * from \"./ModelProps\";\r\nexport * from \"./NativeAppProps\";\r\nexport * from \"./OctEncodedNormal\";\r\nexport * from \"./ConcurrentQuery\";\r\nexport * from \"./ECSqlReader\";\r\nexport * from \"./PlanarClipMask\";\r\nexport * from \"./ModelGeometryChanges\";\r\nexport * from \"./PlanProjectionSettings\";\r\nexport * from \"./QPoint\";\r\nexport * from \"./RealityDataAccessProps\";\r\nexport * from \"./RealityModelDisplaySettings\";\r\nexport * from \"./RenderPolyline\";\r\nexport * from \"./RenderMaterial\";\r\nexport * from \"./RenderSchedule\";\r\nexport * from \"./RenderTexture\";\r\nexport * from \"./RgbColor\";\r\nexport * from \"./RpcManager\";\r\nexport * from \"./SessionProps\";\r\nexport * from \"./SkyBox\";\r\nexport * from \"./SolarCalculate\";\r\nexport * from \"./SolarShadows\";\r\nexport * from \"./SpatialClassification\";\r\nexport * from \"./SubCategoryAppearance\";\r\nexport * from \"./SubCategoryOverride\";\r\nexport * from \"./CesiumIonAssets\";\r\nexport * from \"./TerrainSettings\";\r\nexport * from \"./TextureMapping\";\r\nexport * from \"./TextureProps\";\r\nexport * from \"./ThematicDisplay\";\r\nexport * from \"./ContourDisplay\";\r\nexport * from \"./Thumbnail\";\r\nexport * from \"./TileProps\";\r\nexport * from \"./Tween\";\r\nexport * from \"./TxnAction\";\r\nexport * from \"./ViewDetails\";\r\nexport * from \"./ViewFlags\";\r\nexport * from \"./ViewProps\";\r\nexport * from \"./rpc/core/RpcConstants\";\r\nexport * from \"./rpc/core/RpcControl\";\r\nexport * from \"./rpc/core/RpcInvocation\";\r\nexport * from \"./rpc/core/RpcSessionInvocation\";\r\nexport * from \"./rpc/core/RpcMarshaling\";\r\nexport * from \"./rpc/core/RpcOperation\";\r\nexport * from \"./rpc/core/RpcPendingQueue\";\r\nexport * from \"./rpc/core/RpcProtocol\";\r\nexport * from \"./rpc/core/RpcRegistry\";\r\nexport * from \"./rpc/core/RpcRequest\";\r\nexport * from \"./rpc/core/RpcRequestContext\";\r\nexport * from \"./rpc/core/RpcRoutingToken\";\r\nexport * from \"./rpc/core/RpcPush\";\r\nexport * from \"./rpc/core/RpcConfiguration\";\r\nexport * from \"./rpc/DevToolsRpcInterface\";\r\nexport * from \"./rpc/IModelReadRpcInterface\";\r\nexport * from \"./rpc/IModelTileRpcInterface\";\r\nexport * from \"./rpc/SnapshotIModelRpcInterface\";\r\nexport * from \"./rpc/TestRpcManager\";\r\nexport * from \"./RpcInterface\";\r\nexport * from \"./rpc/web/BentleyCloudRpcManager\";\r\nexport * from \"./rpc/web/BentleyCloudRpcProtocol\";\r\nexport * from \"./rpc/web/OpenAPI\";\r\nexport * from \"./rpc/web/RpcMultipart\";\r\nexport * from \"./rpc/web/WebAppRpcProtocol\";\r\nexport * from \"./rpc/web/WebAppRpcRequest\";\r\nexport * from \"./rpc/web/WebAppRpcLogging\";\r\nexport * from \"./tile/B3dmTileIO\";\r\nexport * from \"./tile/CompositeTileIO\";\r\nexport * from \"./tile/ElementGraphics\";\r\nexport * from \"./tile/GltfTileIO\";\r\nexport * from \"./tile/I3dmTileIO\";\r\nexport * from \"./tile/IModelTileIO\";\r\nexport * from \"./tile/PntsTileIO\";\r\nexport * from \"./tile/TileIO\";\r\nexport * from \"./tile/TileMetadata\";\r\nexport * from \"./tile/Tileset3dSchema\";\r\nexport * from \"./WhiteOnWhiteReversalSettings\";\r\n\r\nexport * from \"./internal/cross-package\";\r\n\r\n/** @docs-package-description\r\n * The core-common package contains classes for working with iModels that can be used in both [frontend]($docs/learning/frontend/index.md) and [backend]($docs/learning/backend/index.md).\r\n */\r\n/**\r\n * @docs-group-description Entities\r\n * Definitions of the \"props\" interfaces and types that define the [wire format]($docs/learning/wireformat.md) for communication between the frontend and backend about entities (models, elements, etc) contained in an iModel.\r\n */\r\n/**\r\n * @docs-group-description Codes\r\n * Types for working with [Codes]($docs/bis/guide/fundamentals/codes.md).\r\n */\r\n/**\r\n * @docs-group-description Geometry\r\n * Types for working with geometry.\r\n */\r\n/**\r\n * @docs-group-description Serialization\r\n * Types for serializing geometry\r\n */\r\n/**\r\n * @docs-group-description Views\r\n * Types for defining graphical views of the contents of an iModel.\r\n */\r\n/**\r\n * @docs-group-description DisplayStyles\r\n * Types for describing how the contents of Views should be rendered.\r\n */\r\n/**\r\n * @docs-group-description Rendering\r\n * Types describing geometry, views, and symbology for consumption by a display system.\r\n */\r\n/**\r\n * @docs-group-description Symbology\r\n * Types that define the appearance of geometry.\r\n */\r\n/**\r\n * @docs-group-description iModels\r\n * Types for working with [iModels]($docs/learning/IModels.md) in both the frontend and backend.\r\n */\r\n/**\r\n * @docs-group-description RpcInterface\r\n * Types for working with [RpcInterfaces]($docs/learning/RpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description IpcSocket\r\n * Types for working with [IpcInterfaces]($docs/learning/IpcInterface.md).\r\n */\r\n/**\r\n * @docs-group-description ECSQL\r\n * Types for working with [ECSQL]($docs/learning/ECSQL.md), [Spatial Queries]($docs/learning/SpatialQueries.md), and [ECSQL Geometry Functions]($docs/learning/GeometrySqlFuncs.md).\r\n */\r\n/**\r\n * @docs-group-description Logging\r\n * Logger categories used by this package.\r\n */\r\n/**\r\n * @docs-group-description CloudStorage\r\n * Types for working with Cloud Storage.\r\n */\r\n/**\r\n * @docs-group-description Tween\r\n * Tweening library adapted from tween.js.\r\n */\r\n/**\r\n * @docs-group-description Tile\r\n * Types for working with 3d tile formats.\r\n */\r\n/**\r\n * @docs-group-description Utils\r\n * Miscellaneous utility classes.\r\n */\r\n/**\r\n * @docs-group-description NativeApp\r\n * [Native applications]($docs/learning/NativeApps.md)\r\n */\r\n/**\r\n * @docs-group-description Localization\r\n * Classes for internationalization and localization of your app.\r\n */\r\n/**\r\n * @docs-group-description Authorization\r\n * Classes for managing AccessToken used for all requests in other classes.\r\n */\r\n/**\r\n * @docs-group-description RealityData\r\n * Types for working with the RealityData API.\r\n */\r\n/**\r\n * @docs-group-description MapLayers\r\n * Types for working with the MapLayers API.\r\n */\r\n/**\r\n * @docs-group-description Annotation\r\n * APIs for producing and manipulating annotations like text, dimensions, and labels.\r\n */\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FunctionalElementProps.js","sourceRoot":"","sources":["../../../src/domains/FunctionalElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Entities\n */\n\nimport { ElementProps, RelatedElementProps } from \"../ElementProps\";\n\n/**\n * @public\n * @extensions\n */\nexport interface FunctionalElementProps extends ElementProps {\n typeDefinition?: RelatedElementProps;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"FunctionalElementProps.js","sourceRoot":"","sources":["../../../src/domains/FunctionalElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Entities\r\n */\r\n\r\nimport { ElementProps, RelatedElementProps } from \"../ElementProps\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface FunctionalElementProps extends ElementProps {\r\n typeDefinition?: RelatedElementProps;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GenericElementProps.js","sourceRoot":"","sources":["../../../src/domains/GenericElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Entities\n */\n\nimport { GeometricElement2dProps, RelatedElementProps } from \"../ElementProps\";\n\n/**\n * @public\n * @extensions\n */\nexport interface ViewAttachmentLabelProps extends GeometricElement2dProps {\n viewAttachment?: RelatedElementProps;\n}\n\n/**\n * @public\n * @extensions\n */\nexport interface CalloutProps extends GeometricElement2dProps {\n drawingModel?: RelatedElementProps;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"GenericElementProps.js","sourceRoot":"","sources":["../../../src/domains/GenericElementProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Entities\r\n */\r\n\r\nimport { GeometricElement2dProps, RelatedElementProps } from \"../ElementProps\";\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface ViewAttachmentLabelProps extends GeometricElement2dProps {\r\n viewAttachment?: RelatedElementProps;\r\n}\r\n\r\n/**\r\n * @public\r\n * @extensions\r\n */\r\nexport interface CalloutProps extends GeometricElement2dProps {\r\n drawingModel?: RelatedElementProps;\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdditionalTransform.js","sourceRoot":"","sources":["../../../src/geometry/AdditionalTransform.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,wBAAwB;;;AAExB,wDAAiG;AAwBjG;;;;;;;;;GASG;AACH,MAAa,oBAAoB;IAC/B,6BAA6B;IACtB,YAAY,CAAU;IAC7B,6BAA6B;IACtB,YAAY,CAAU;IAC7B,wCAAwC;IACjC,YAAY,CAAU;IAC7B,oEAAoE;IAC7D,MAAM,CAAU;IACvB,iFAAiF;IAC1E,KAAK,CAAU;IAEtB,YAAY,IAAgC;QAC1C,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,YAAY,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AAO,IAAI,CAAC;IACd,CAAC;CACF;AAlCD,kDAkCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n// cspell:ignore Helmert\n\nimport { Angle, AxisIndex, Geometry, Matrix3d, Transform, Vector3d } from \"@itwin/core-geometry\";\n\n/** An affine transformation with an additional Z Offset.\n * The equations are:\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\n * X = a * x - b * y + translationX\n * Y = b * x + a * y + translationY\n * Z = z + translationZ\n * @public\n * @extensions\n */\nexport interface Helmert2DWithZOffsetProps {\n /** The X post translation */\n translationX: number;\n /** The Y post-translation */\n translationY: number;\n /** The Z post-translation or Z offset*/\n translationZ: number;\n /** The rotation in the trigonometric (CCW) direction in degrees. */\n rotDeg: number;\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\n scale: number;\n}\n\n/** An affine transformation with an additional Z Offset.\n * The equations are:\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\n * X = a * x - b * y + translationX\n * Y = b * x + a * y + translationY\n * Z = z + translationZ\n *\n * Note that the class only implements the definition and not the operation.\n * @public\n */\nexport class Helmert2DWithZOffset implements Helmert2DWithZOffsetProps {\n /** The X post translation */\n public translationX!: number;\n /** The Y post-translation */\n public translationY!: number;\n /** The Z post-translation or Z offset*/\n public translationZ!: number;\n /** The rotation in the trigonometric (CCW) direction in degrees. */\n public rotDeg!: number;\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\n public scale!: number;\n\n constructor(data?: Helmert2DWithZOffsetProps) {\n if (data) {\n this.translationX = data.translationX;\n this.translationY = data.translationY;\n this.translationZ = data.translationZ;\n this.rotDeg = data.rotDeg;\n this.scale = data.scale;\n }\n }\n\n /** Creates an Helmert Transform from JSON representation.\n * @public */\n public static fromJSON(data: Helmert2DWithZOffsetProps): Helmert2DWithZOffset {\n return new Helmert2DWithZOffset(data);\n }\n\n /** Creates a JSON from the Helmert Transform definition\n * @public */\n public toJSON(): Helmert2DWithZOffsetProps {\n return { translationX: this.translationX, translationY: this.translationY, translationZ: this.translationZ, rotDeg: this.rotDeg, scale: this.scale };\n }\n\n /** Compares two Helmert2DWithZOffset objects applying a minuscule tolerance.\n * @public */\n public equals(other: Helmert2DWithZOffset): boolean {\n return (Math.abs(this.translationX - other.translationX) < Geometry.smallMetricDistance &&\n Math.abs(this.translationY - other.translationY) < Geometry.smallMetricDistance &&\n Math.abs(this.translationZ - other.translationZ) < Geometry.smallMetricDistance &&\n Math.abs(this.rotDeg - other.rotDeg) < Geometry.smallAngleDegrees &&\n Math.abs(this.scale - other.scale) < Geometry.smallFraction);\n }\n\n /** Convert Helmert2DWithZOffset object into Transfrom object\n * @public */\n public convertHelmertToTransform(): Transform {\n const rotationXY = Matrix3d.createRotationAroundAxisIndex(\n AxisIndex.Z,\n Angle.createDegrees(this?.rotDeg)\n );\n rotationXY.scaleColumnsInPlace(this.scale, this.scale, 1.0);\n const translation = Vector3d.create(\n this.translationX,\n this.translationY,\n this.translationZ\n );\n const helmertTransform = Transform.createRefs(translation, rotationXY);\n\n return helmertTransform;\n }\n}\n\n/** Additional Transform definition\n * @public\n * @extensions\n */\nexport interface AdditionalTransformProps {\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\n helmert2DWithZOffset?: Helmert2DWithZOffsetProps;\n}\n\n/** Additional Transform implementation.\n * An additional transform is a transformation that can apply to either the horizontal or vertical coordinates of a\n * geographic CRS. The transformation is applied after the latitude/longitude have been projected thus the process\n * is applied to the result Cartesian coordinates of the projection process.\n * @public\n*/\nexport class AdditionalTransform implements AdditionalTransformProps {\n\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\n public readonly helmert2DWithZOffset?: Helmert2DWithZOffset;\n\n public constructor(data?: AdditionalTransformProps) {\n if (data)\n this.helmert2DWithZOffset = data.helmert2DWithZOffset ? Helmert2DWithZOffset.fromJSON(data.helmert2DWithZOffset) : undefined;\n }\n\n /** Creates an Additional Transform from JSON representation.\n * @public */\n public static fromJSON(data: AdditionalTransformProps): AdditionalTransform {\n return new AdditionalTransform(data);\n }\n\n /** Creates a JSON from the Additional Transform definition\n * @public */\n public toJSON(): AdditionalTransformProps {\n return { helmert2DWithZOffset: this.helmert2DWithZOffset };\n }\n\n /** Compares two additional transforms applying a minuscule tolerance to comparing numbers.\n * @public */\n public equals(other: AdditionalTransform): boolean {\n if ((this.helmert2DWithZOffset === undefined) !== (other.helmert2DWithZOffset === undefined))\n return false;\n\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.helmert2DWithZOffset && !this.helmert2DWithZOffset.equals(other.helmert2DWithZOffset!))\n return false;\n\n return true;\n }\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"AdditionalTransform.js","sourceRoot":"","sources":["../../../src/geometry/AdditionalTransform.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;AACH,wBAAwB;;;AAExB,wDAAiG;AAwBjG;;;;;;;;;GASG;AACH,MAAa,oBAAoB;IAC/B,6BAA6B;IACtB,YAAY,CAAU;IAC7B,6BAA6B;IACtB,YAAY,CAAU;IAC7B,wCAAwC;IACjC,YAAY,CAAU;IAC7B,oEAAoE;IAC7D,MAAM,CAAU;IACvB,iFAAiF;IAC1E,KAAK,CAAU;IAEtB,YAAY,IAAgC;QAC1C,IAAI,IAAI,EAAE,CAAC;YACT,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;YACtC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC;YAC1B,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAC1B,CAAC;IACH,CAAC;IAED;iBACa;IACN,MA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CAAC,MAAM,CACjC,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,YAAY,EACjB,IAAI,CAAC,YAAY,CAClB,CAAC;QACF,MAAM,gBAAgB,GAAG,yBAAS,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,CAAC,CAAC;QAEvE,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF;AA7DD,oDA6DC;AAWD;;;;;EAKE;AACF,MAAa,mBAAmB;IAE9B,gFAAgF;IAChE,oBAAoB,CAAwB;IAE5D,YAAmB,IAA+B;QAChD,IAAI,IAAI;YACN,IAAI,CAAC,oBAAoB,GAAG,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjI,CAAC;IAED;iBACa;IACN,MAAM,CAAC,QAAQ,CAAC,IAA8B;QACnD,OAAO,IAAI,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;IAED;iBACa;IACN,MAAM;QACX,OAAO,EAAE,oBAAoB,EAAE,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC7D,CAAC;IAED;kBACc;IACP,MAAM,CAAC,KAA0B;QACtC,IAAI,CAAC,IAAI,CAAC,oBAAoB,KAAK,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,oBAAoB,KAAK,SAAS,CAAC;YAC1F,OAAO,KAAK,CAAC;QAEf,oEAAoE;QACpE,IAAI,IAAI,CAAC,oBAAoB,IAAI,CAAC,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,KAAK,CAAC,oBAAqB,CAAC;YAC7F,OAAO,KAAK,CAAC;QAEf,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAlCD,kDAkCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n// cspell:ignore Helmert\r\n\r\nimport { Angle, AxisIndex, Geometry, Matrix3d, Transform, Vector3d } from \"@itwin/core-geometry\";\r\n\r\n/** An affine transformation with an additional Z Offset.\r\n * The equations are:\r\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\r\n * X = a * x - b * y + translationX\r\n * Y = b * x + a * y + translationY\r\n * Z = z + translationZ\r\n * @public\r\n * @extensions\r\n */\r\nexport interface Helmert2DWithZOffsetProps {\r\n /** The X post translation */\r\n translationX: number;\r\n /** The Y post-translation */\r\n translationY: number;\r\n /** The Z post-translation or Z offset*/\r\n translationZ: number;\r\n /** The rotation in the trigonometric (CCW) direction in degrees. */\r\n rotDeg: number;\r\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\r\n scale: number;\r\n}\r\n\r\n/** An affine transformation with an additional Z Offset.\r\n * The equations are:\r\n * given a = scale * cos(rotation) and b = scale * sin(rotation)\r\n * X = a * x - b * y + translationX\r\n * Y = b * x + a * y + translationY\r\n * Z = z + translationZ\r\n *\r\n * Note that the class only implements the definition and not the operation.\r\n * @public\r\n */\r\nexport class Helmert2DWithZOffset implements Helmert2DWithZOffsetProps {\r\n /** The X post translation */\r\n public translationX!: number;\r\n /** The Y post-translation */\r\n public translationY!: number;\r\n /** The Z post-translation or Z offset*/\r\n public translationZ!: number;\r\n /** The rotation in the trigonometric (CCW) direction in degrees. */\r\n public rotDeg!: number;\r\n /** The scale. This scale applies to both X and Y axises. Does not apply to Z. */\r\n public scale!: number;\r\n\r\n constructor(data?: Helmert2DWithZOffsetProps) {\r\n if (data) {\r\n this.translationX = data.translationX;\r\n this.translationY = data.translationY;\r\n this.translationZ = data.translationZ;\r\n this.rotDeg = data.rotDeg;\r\n this.scale = data.scale;\r\n }\r\n }\r\n\r\n /** Creates an Helmert Transform from JSON representation.\r\n * @public */\r\n public static fromJSON(data: Helmert2DWithZOffsetProps): Helmert2DWithZOffset {\r\n return new Helmert2DWithZOffset(data);\r\n }\r\n\r\n /** Creates a JSON from the Helmert Transform definition\r\n * @public */\r\n public toJSON(): Helmert2DWithZOffsetProps {\r\n return { translationX: this.translationX, translationY: this.translationY, translationZ: this.translationZ, rotDeg: this.rotDeg, scale: this.scale };\r\n }\r\n\r\n /** Compares two Helmert2DWithZOffset objects applying a minuscule tolerance.\r\n * @public */\r\n public equals(other: Helmert2DWithZOffset): boolean {\r\n return (Math.abs(this.translationX - other.translationX) < Geometry.smallMetricDistance &&\r\n Math.abs(this.translationY - other.translationY) < Geometry.smallMetricDistance &&\r\n Math.abs(this.translationZ - other.translationZ) < Geometry.smallMetricDistance &&\r\n Math.abs(this.rotDeg - other.rotDeg) < Geometry.smallAngleDegrees &&\r\n Math.abs(this.scale - other.scale) < Geometry.smallFraction);\r\n }\r\n\r\n /** Convert Helmert2DWithZOffset object into Transfrom object\r\n * @public */\r\n public convertHelmertToTransform(): Transform {\r\n const rotationXY = Matrix3d.createRotationAroundAxisIndex(\r\n AxisIndex.Z,\r\n Angle.createDegrees(this?.rotDeg)\r\n );\r\n rotationXY.scaleColumnsInPlace(this.scale, this.scale, 1.0);\r\n const translation = Vector3d.create(\r\n this.translationX,\r\n this.translationY,\r\n this.translationZ\r\n );\r\n const helmertTransform = Transform.createRefs(translation, rotationXY);\r\n\r\n return helmertTransform;\r\n }\r\n}\r\n\r\n/** Additional Transform definition\r\n * @public\r\n * @extensions\r\n */\r\nexport interface AdditionalTransformProps {\r\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\r\n helmert2DWithZOffset?: Helmert2DWithZOffsetProps;\r\n}\r\n\r\n/** Additional Transform implementation.\r\n * An additional transform is a transformation that can apply to either the horizontal or vertical coordinates of a\r\n * geographic CRS. The transformation is applied after the latitude/longitude have been projected thus the process\r\n * is applied to the result Cartesian coordinates of the projection process.\r\n * @public\r\n*/\r\nexport class AdditionalTransform implements AdditionalTransformProps {\r\n\r\n /** The properties of a 2D Helmert transform with Z offset if one is defined. */\r\n public readonly helmert2DWithZOffset?: Helmert2DWithZOffset;\r\n\r\n public constructor(data?: AdditionalTransformProps) {\r\n if (data)\r\n this.helmert2DWithZOffset = data.helmert2DWithZOffset ? Helmert2DWithZOffset.fromJSON(data.helmert2DWithZOffset) : undefined;\r\n }\r\n\r\n /** Creates an Additional Transform from JSON representation.\r\n * @public */\r\n public static fromJSON(data: AdditionalTransformProps): AdditionalTransform {\r\n return new AdditionalTransform(data);\r\n }\r\n\r\n /** Creates a JSON from the Additional Transform definition\r\n * @public */\r\n public toJSON(): AdditionalTransformProps {\r\n return { helmert2DWithZOffset: this.helmert2DWithZOffset };\r\n }\r\n\r\n /** Compares two additional transforms applying a minuscule tolerance to comparing numbers.\r\n * @public */\r\n public equals(other: AdditionalTransform): boolean {\r\n if ((this.helmert2DWithZOffset === undefined) !== (other.helmert2DWithZOffset === undefined))\r\n return false;\r\n\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.helmert2DWithZOffset && !this.helmert2DWithZOffset.equals(other.helmert2DWithZOffset!))\r\n return false;\r\n\r\n return true;\r\n }\r\n}\r\n\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AreaPattern.js","sourceRoot":"","sources":["../../../src/geometry/AreaPattern.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,wDAE8B;AAC9B,0CAAsD;AAEtD,cAAc;AACd,IAAiB,WAAW,CAuR3B;AAvRD,WAAiB,WAAW;IAa1B,MAAa,YAAY;QAChB,KAAK,CAAS;QACd,OAAO,CAAW;QAClB,MAAM,CAAW;QACjB,MAAM,CAAY;QAEzB,YAAmB,IAAuB;YACxC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,qBAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACjE,IAAI,CAAC,OAAO,GAA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;gBACN,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;gBAC7G,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,KAAK,IAAI,CAAC,MAAM;oBAClC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC;YAC7F,CAAC;YAED,MAAM,GAAG,SAAS,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;YAC3C,OAAO,CAAC,oBAAoB,CAAC,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YACxD,MAAM,UAAU,GAAG,wBAAQ,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC;YAC7D,IAAI,CAAC,UAAU;gBACb,OAAO,KAAK,CAAC;YACf,MAAM,WAAW,GAAG,kCAAkB,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC;YACtE,IAAI,SAAS,KAAK,WAAW;gBAC3B,OAAO,KAAK,CAAC;YACf,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;YACrB,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC;YAC5B,OAAO,IAAI,CAAC;QACd,CAAC;KACF;IAtNY,kBAAM,SAsNlB,CAAA;AACH,CAAC,EAvRgB,WAAW,2BAAX,WAAW,QAuR3B","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Symbology\n */\n\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport {\n Angle, AngleProps, Geometry, Matrix3d, Point2d, Point3d, Transform, XYProps, XYZProps, YawPitchRollAngles, YawPitchRollProps,\n} from \"@itwin/core-geometry\";\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\n\n/** @public */\nexport namespace AreaPattern {\n /** Single hatch line definition */\n export interface HatchDefLineProps {\n /** Angle of hatch line, 0.0 if undefined */\n angle?: AngleProps;\n /** Origin point (relative to placement) the hatch passes through, 0.0,0.0 if undefined */\n through?: XYProps;\n /** Offset of successive lines. X offset staggers dashes (ignored for solid lines) and Y offset controls the distance between both solid and dashed lines, 0.0,0.0 if undefined */\n offset?: XYProps;\n /** Array of gap and dash lengths for creating non-solid hatch lines, max of 20. A positive value denotes dash, a negative value a gap, solid line if undefined */\n dashes?: number[];\n }\n\n export class HatchDefLine implements HatchDefLineProps {\n public angle?: Angle;\n public through?: Point2d;\n public offset?: Point2d;\n public dashes?: number[];\n\n public constructor(json: HatchDefLineProps) {\n this.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\n this.through = json.through ? Point2d.fromJSON(json.through) : undefined;\n this.offset = json.offset ? Point2d.fromJSON(json.offset) : undefined;\n if (json.dashes) {\n const dashes: number[] = [];\n json.dashes.forEach((dash) => dashes.push(dash));\n this.dashes = dashes;\n }\n }\n }\n\n /** Definition of a hatch, cross-hatch, or area pattern that can be applied to the interior of a planar region.\n * @see [[GeometryStreamEntryProps]]\n */\n export interface ParamsProps {\n /** Pattern offset (relative to placement), 0.0,0.0,0.0 if undefined */\n origin?: XYZProps;\n /** Pattern orientation (relative to placement), 0.0,0.0,0.0 if undefined */\n rotation?: YawPitchRollProps;\n /** Spacing of first set of parallel lines in a hatch pattern, or row spacing between area pattern tiles, 0.0 if undefined */\n space1?: number;\n /** Spacing of second set of parallel lines in a cross-hatch (leave undefined or 0 for a hatch), or column spacing between area pattern tiles, 0.0 if undefined */\n space2?: number;\n /** Angle of first set of parallel lines in a hatch pattern or area pattern tile direction, 0.0 if undefined */\n angle1?: AngleProps;\n /** Angle of second set of parallel lines in a cross-hatch, 0.0 if undefined */\n angle2?: AngleProps;\n /** Scale to apply to area pattern symbol, 1.0 if undefined */\n scale?: number;\n /** Pattern color, leave undefined to inherit color from parent element. For area patterns, does not override explicit colors stored in symbol */\n color?: ColorDefProps;\n /** Pattern weight, leave undefined to inherit weight from parent element. For area patterns, does not override explicit weights stored in symbol */\n weight?: number;\n /** Set to inhibit display of pattern boundary, not applicable when boundary is also filled, false if undefined */\n invisibleBoundary?: boolean;\n /** Set to allow snapping to pattern geometry, false if undefined */\n snappable?: boolean;\n /** [[GeometryPart]] id to use for tiled area pattern display */\n symbolId?: Id64String;\n /** Define an area pattern by supplying hatch line definitions instead of using a [[GeometryPart]] */\n defLines?: HatchDefLineProps[];\n }\n\n /** Defines a hatch, cross hatch, or area pattern. */\n export class Params {\n public origin?: Point3d;\n public rotation?: YawPitchRollAngles;\n public space1?: number;\n public space2?: number;\n public angle1?: Angle;\n public angle2?: Angle;\n public scale?: number;\n public color?: ColorDef;\n public weight?: number;\n public invisibleBoundary?: boolean;\n public snappable?: boolean;\n public symbolId?: Id64String;\n public defLines?: HatchDefLine[];\n\n /** create an AreaPattern.Params from a json object. */\n public static fromJSON(json?: ParamsProps) {\n const result = new Params();\n if (!json)\n return result;\n result.origin = json.origin ? Point3d.fromJSON(json.origin) : undefined;\n result.rotation = json.rotation ? YawPitchRollAngles.fromJSON(json.rotation) : undefined;\n result.space1 = json.space1;\n result.space2 = json.space2;\n result.angle1 = json.angle1 ? Angle.fromJSON(json.angle1) : undefined;\n result.angle2 = json.angle2 ? Angle.fromJSON(json.angle2) : undefined;\n result.scale = json.scale;\n result.color = json.color ? ColorDef.fromJSON(json.color) : undefined;\n result.weight = json.weight;\n result.invisibleBoundary = json.invisibleBoundary;\n result.snappable = json.snappable;\n result.symbolId = json.symbolId ? Id64.fromJSON(json.symbolId) : undefined;\n if (!json.defLines)\n return result;\n const defLines: HatchDefLine[] = [];\n json.defLines.forEach((defLine) => defLines.push(new HatchDefLine(defLine)));\n result.defLines = defLines;\n return result;\n }\n\n public toJSON(): ParamsProps {\n return {\n ...this,\n color: this.color?.toJSON(),\n };\n }\n\n public clone(): Params {\n return Params.fromJSON(this.toJSON());\n }\n\n public equals(other: Params): boolean {\n if (this === other)\n return true; // Same pointer\n\n if (this.scale !== other.scale ||\n this.space1 !== other.space1 ||\n this.space2 !== other.space2 ||\n this.weight !== other.weight ||\n this.invisibleBoundary !== other.invisibleBoundary ||\n this.snappable !== other.snappable)\n return false;\n\n if ((this.color === undefined) !== (other.color === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.color && !this.color.equals(other.color!))\n return false;\n\n if ((this.angle1 === undefined) !== (other.angle1 === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.angle1 && !this.angle1.isAlmostEqualNoPeriodShift(other.angle1!))\n return false;\n\n if ((this.angle2 === undefined) !== (other.angle2 === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.angle2 && !this.angle2.isAlmostEqualNoPeriodShift(other.angle2!))\n return false;\n\n if ((this.origin === undefined) !== (other.origin === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.origin && !this.origin.isAlmostEqual(other.origin!))\n return false;\n\n if ((this.rotation === undefined) !== (other.rotation === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.rotation && !this.rotation.isAlmostEqual(other.rotation!))\n return false;\n\n if ((this.symbolId === undefined) !== (other.symbolId === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.symbolId && !(this.symbolId === other.symbolId!))\n return false;\n\n if ((this.defLines === undefined) !== (other.defLines === undefined))\n return false;\n if (this.defLines) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (this.defLines.length !== other.defLines!.length)\n return false;\n\n for (let i = 0; i < this.defLines.length; ++i) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const otherLine = other.defLines![i];\n const thisLine = this.defLines[i];\n\n if ((thisLine.angle === undefined) !== (otherLine.angle === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (thisLine.angle && !thisLine.angle.isAlmostEqualNoPeriodShift(otherLine.angle!))\n return false;\n\n if ((thisLine.through === undefined) !== (otherLine.through === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (thisLine.through && !thisLine.through.isAlmostEqual(otherLine.through!))\n return false;\n\n if ((thisLine.offset === undefined) !== (otherLine.offset === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (thisLine.offset && !thisLine.offset.isAlmostEqual(otherLine.offset!))\n return false;\n\n if ((thisLine.dashes === undefined) !== (otherLine.dashes === undefined))\n return false;\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (thisLine.dashes && thisLine.dashes.length !== otherLine.dashes!.length)\n return false;\n if (thisLine.dashes) {\n for (let dash = 0; dash < thisLine.dashes.length; ++dash) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n if (!Geometry.isSameCoordinate(thisLine.dashes[dash], otherLine.dashes![dash]))\n return false;\n }\n }\n }\n }\n return true;\n }\n\n public static transformPatternSpace(transform: Transform, oldSpace: number, patRot: Matrix3d, angle?: Angle): number {\n let tmpRot: Matrix3d;\n if (angle && !angle.isAlmostZero) {\n const yprTriple = new YawPitchRollAngles(angle);\n const angRot = yprTriple.toMatrix3d();\n tmpRot = patRot.multiplyMatrixMatrix(angRot);\n } else {\n tmpRot = patRot;\n }\n const yDir = tmpRot.getColumn(1);\n yDir.scale(oldSpace, yDir);\n transform.multiplyVector(yDir, yDir);\n return yDir.magnitude();\n }\n\n public static getTransformPatternScale(transform: Transform): number {\n const xDir = transform.matrix.getColumn(0);\n const mag = xDir.magnitude();\n return (mag > 1.0e-10) ? mag : 1.0;\n }\n\n public applyTransform(transform: Transform): boolean {\n if (transform.isIdentity)\n return true;\n let origin = this.origin ? this.origin : Point3d.createZero();\n const rMatrix = this.rotation ? this.rotation.toMatrix3d() : Matrix3d.createIdentity();\n if (this.symbolId !== undefined) {\n this.space1 = Params.transformPatternSpace(transform, this.space1 ? this.space1 : 0.0, rMatrix, this.angle1);\n this.space2 = Params.transformPatternSpace(transform, this.space2 ? this.space2 : 0.0, rMatrix, this.angle2);\n const scale = Params.getTransformPatternScale(transform);\n this.scale = this.scale ? this.scale * scale : scale;\n } else if (this.defLines) {\n const scale = Params.getTransformPatternScale(transform);\n if (!Geometry.isSameCoordinate(scale, 1.0)) {\n this.scale = this.scale ? this.scale * scale : scale;\n for (const line of this.defLines) {\n if (line.through) {\n line.through.x *= scale;\n line.through.y *= scale;\n }\n if (line.offset) {\n line.offset.x *= scale;\n line.offset.y *= scale;\n }\n if (line.dashes) {\n for (let iDash = 0; iDash < line.dashes.length; iDash++)\n line.dashes[iDash] *= scale;\n }\n }\n }\n } else {\n this.space1 = Params.transformPatternSpace(transform, this.space1 ? this.space1 : 0.0, rMatrix, this.angle1);\n if (this.space2 && 0 !== this.space2)\n this.space2 = Params.transformPatternSpace(transform, this.space2, rMatrix, this.angle2);\n }\n\n origin = transform.multiplyPoint3d(origin);\n rMatrix.multiplyMatrixMatrix(transform.matrix, rMatrix);\n const normalized = Matrix3d.createRigidFromMatrix3d(rMatrix);\n if (!normalized)\n return false;\n const newRotation = YawPitchRollAngles.createFromMatrix3d(normalized);\n if (undefined === newRotation)\n return false;\n this.origin = origin;\n this.rotation = newRotation;\n return true;\n }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AreaPattern.js","sourceRoot":"","sources":["../../../src/geometry/AreaPattern.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuD;AACvD,wDAE8B;AAC9B,0CAAsD;AAEtD,cAAc;AACd,IAAiB,WAAW,CAuR3B;AAvRD,WAAiB,WAAW;IAa1B,MAAa,YAAY;QAChB,KAAK,CAAS;QACd,OAAO,CAAW;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esContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Symbology\r\n */\r\n\r\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\r\nimport {\r\n Angle, AngleProps, Geometry, Matrix3d, Point2d, Point3d, Transform, XYProps, XYZProps, YawPitchRollAngles, YawPitchRollProps,\r\n} from \"@itwin/core-geometry\";\r\nimport { ColorDef, ColorDefProps } from \"../ColorDef\";\r\n\r\n/** @public */\r\nexport namespace AreaPattern {\r\n /** Single hatch line definition */\r\n export interface HatchDefLineProps {\r\n /** Angle of hatch line, 0.0 if undefined */\r\n angle?: AngleProps;\r\n /** Origin point (relative to placement) the hatch passes through, 0.0,0.0 if undefined */\r\n through?: XYProps;\r\n /** Offset of successive lines. X offset staggers dashes (ignored for solid lines) and Y offset controls the distance between both solid and dashed lines, 0.0,0.0 if undefined */\r\n offset?: XYProps;\r\n /** Array of gap and dash lengths for creating non-solid hatch lines, max of 20. A positive value denotes dash, a negative value a gap, solid line if undefined */\r\n dashes?: number[];\r\n }\r\n\r\n export class HatchDefLine implements HatchDefLineProps {\r\n public angle?: Angle;\r\n public through?: Point2d;\r\n public offset?: Point2d;\r\n public dashes?: number[];\r\n\r\n public constructor(json: HatchDefLineProps) {\r\n this.angle = json.angle ? Angle.fromJSON(json.angle) : undefined;\r\n this.through = json.through ? Point2d.fromJSON(json.through) : undefined;\r\n this.offset = json.offset ? Point2d.fromJSON(json.offset) : undefined;\r\n if (json.dashes) {\r\n const dashes: number[] = [];\r\n json.dashes.forEach((dash) => dashes.push(dash));\r\n this.dashes = dashes;\r\n }\r\n }\r\n }\r\n\r\n /** Definition of a hatch, cross-hatch, or area pattern that can be applied to the interior of a planar region.\r\n * @see [[GeometryStreamEntryProps]]\r\n */\r\n export interface ParamsProps {\r\n /** Pattern offset (relative to placement), 0.0,0.0,0.0 if undefined */\r\n origin?: XYZProps;\r\n /** Pattern orientation (relative to placement), 0.0,0.0,0.0 if undefined */\r\n rotation?: YawPitchRollProps;\r\n /** Spacing of first set of parallel lines in a hatch pattern, or row spacing between area pattern tiles, 0.0 if undefined */\r\n space1?: number;\r\n /** Spacing of second set of parallel lines in a cross-hatch (leave undefined or 0 for a hatch), or column spacing between area pattern tiles, 0.0 if undefined */\r\n space2?: number;\r\n /** Angle of first set of parallel lines in a hatch pattern or area pattern tile direction, 0.0 if undefined */\r\n angle1?: AngleProps;\r\n /** Angle of second set of parallel lines in a cross-hatch, 0.0 if undefined */\r\n angle2?: AngleProps;\r\n /** Scale to apply to area pattern symbol, 1.0 if undefined */\r\n scale?: number;\r\n /** Pattern color, leave undefined to inherit color from parent element. For area patterns, does not override explicit colors stored in symbol */\r\n color?: ColorDefProps;\r\n /** Pattern weight, leave undefined to inherit weight from parent element. For area patterns, does not override explicit weights stored in symbol */\r\n weight?: number;\r\n /** Set to inhibit display of pattern boundary, not applicable when boundary is also filled, false if undefined */\r\n invisibleBoundary?: boolean;\r\n /** Set to allow snapping to pattern geometry, false if undefined */\r\n snappable?: boolean;\r\n /** [[GeometryPart]] id to use for tiled area pattern display */\r\n symbolId?: Id64String;\r\n /** Define an area pattern by supplying hatch line definitions instead of using a [[GeometryPart]] */\r\n defLines?: HatchDefLineProps[];\r\n }\r\n\r\n /** Defines a hatch, cross hatch, or area pattern. */\r\n export class Params {\r\n public origin?: Point3d;\r\n public rotation?: YawPitchRollAngles;\r\n public space1?: number;\r\n public space2?: number;\r\n public angle1?: Angle;\r\n public angle2?: Angle;\r\n public scale?: number;\r\n public color?: ColorDef;\r\n public weight?: number;\r\n public invisibleBoundary?: boolean;\r\n public snappable?: boolean;\r\n public symbolId?: Id64String;\r\n public defLines?: HatchDefLine[];\r\n\r\n /** create an AreaPattern.Params from a json object. */\r\n public static fromJSON(json?: ParamsProps) {\r\n const result = new Params();\r\n if (!json)\r\n return result;\r\n result.origin = json.origin ? Point3d.fromJSON(json.origin) : undefined;\r\n result.rotation = json.rotation ? YawPitchRollAngles.fromJSON(json.rotation) : undefined;\r\n result.space1 = json.space1;\r\n result.space2 = json.space2;\r\n result.angle1 = json.angle1 ? Angle.fromJSON(json.angle1) : undefined;\r\n result.angle2 = json.angle2 ? Angle.fromJSON(json.angle2) : undefined;\r\n result.scale = json.scale;\r\n result.color = json.color ? ColorDef.fromJSON(json.color) : undefined;\r\n result.weight = json.weight;\r\n result.invisibleBoundary = json.invisibleBoundary;\r\n result.snappable = json.snappable;\r\n result.symbolId = json.symbolId ? Id64.fromJSON(json.symbolId) : undefined;\r\n if (!json.defLines)\r\n return result;\r\n const defLines: HatchDefLine[] = [];\r\n json.defLines.forEach((defLine) => defLines.push(new HatchDefLine(defLine)));\r\n result.defLines = defLines;\r\n return result;\r\n }\r\n\r\n public toJSON(): ParamsProps {\r\n return {\r\n ...this,\r\n color: this.color?.toJSON(),\r\n };\r\n }\r\n\r\n public clone(): Params {\r\n return Params.fromJSON(this.toJSON());\r\n }\r\n\r\n public equals(other: Params): boolean {\r\n if (this === other)\r\n return true; // Same pointer\r\n\r\n if (this.scale !== other.scale ||\r\n this.space1 !== other.space1 ||\r\n this.space2 !== other.space2 ||\r\n this.weight !== other.weight ||\r\n this.invisibleBoundary !== other.invisibleBoundary ||\r\n this.snappable !== other.snappable)\r\n return false;\r\n\r\n if ((this.color === undefined) !== (other.color === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.color && !this.color.equals(other.color!))\r\n return false;\r\n\r\n if ((this.angle1 === undefined) !== (other.angle1 === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.angle1 && !this.angle1.isAlmostEqualNoPeriodShift(other.angle1!))\r\n return false;\r\n\r\n if ((this.angle2 === undefined) !== (other.angle2 === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.angle2 && !this.angle2.isAlmostEqualNoPeriodShift(other.angle2!))\r\n return false;\r\n\r\n if ((this.origin === undefined) !== (other.origin === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.origin && !this.origin.isAlmostEqual(other.origin!))\r\n return false;\r\n\r\n if ((this.rotation === undefined) !== (other.rotation === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.rotation && !this.rotation.isAlmostEqual(other.rotation!))\r\n return false;\r\n\r\n if ((this.symbolId === undefined) !== (other.symbolId === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.symbolId && !(this.symbolId === other.symbolId!))\r\n return false;\r\n\r\n if ((this.defLines === undefined) !== (other.defLines === undefined))\r\n return false;\r\n if (this.defLines) {\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (this.defLines.length !== other.defLines!.length)\r\n return false;\r\n\r\n for (let i = 0; i < this.defLines.length; ++i) {\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n const otherLine = other.defLines![i];\r\n const thisLine = this.defLines[i];\r\n\r\n if ((thisLine.angle === undefined) !== (otherLine.angle === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (thisLine.angle && !thisLine.angle.isAlmostEqualNoPeriodShift(otherLine.angle!))\r\n return false;\r\n\r\n if ((thisLine.through === undefined) !== (otherLine.through === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (thisLine.through && !thisLine.through.isAlmostEqual(otherLine.through!))\r\n return false;\r\n\r\n if ((thisLine.offset === undefined) !== (otherLine.offset === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (thisLine.offset && !thisLine.offset.isAlmostEqual(otherLine.offset!))\r\n return false;\r\n\r\n if ((thisLine.dashes === undefined) !== (otherLine.dashes === undefined))\r\n return false;\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (thisLine.dashes && thisLine.dashes.length !== otherLine.dashes!.length)\r\n return false;\r\n if (thisLine.dashes) {\r\n for (let dash = 0; dash < thisLine.dashes.length; ++dash) {\r\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\r\n if (!Geometry.isSameCoordinate(thisLine.dashes[dash], otherLine.dashes![dash]))\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n }\r\n\r\n public static transformPatternSpace(transform: Transform, oldSpace: number, patRot: Matrix3d, angle?: Angle): number {\r\n let tmpRot: Matrix3d;\r\n if (angle && !angle.isAlmostZero) {\r\n const yprTriple = new YawPitchRollAngles(angle);\r\n const angRot = yprTriple.toMatrix3d();\r\n tmpRot = patRot.multiplyMatrixMatrix(angRot);\r\n } else {\r\n tmpRot = patRot;\r\n }\r\n const yDir = tmpRot.getColumn(1);\r\n yDir.scale(oldSpace, yDir);\r\n transform.multiplyVector(yDir, yDir);\r\n return yDir.magnitude();\r\n }\r\n\r\n public static getTransformPatternScale(transform: Transform): number {\r\n const xDir = transform.matrix.getColumn(0);\r\n const mag = xDir.magnitude();\r\n return (mag > 1.0e-10) ? mag : 1.0;\r\n }\r\n\r\n public applyTransform(transform: Transform): boolean {\r\n if (transform.isIdentity)\r\n return true;\r\n let origin = this.origin ? this.origin : Point3d.createZero();\r\n const rMatrix = this.rotation ? this.rotation.toMatrix3d() : Matrix3d.createIdentity();\r\n if (this.symbolId !== undefined) {\r\n this.space1 = Params.transformPatternSpace(transform, this.space1 ? this.space1 : 0.0, rMatrix, this.angle1);\r\n this.space2 = Params.transformPatternSpace(transform, this.space2 ? this.space2 : 0.0, rMatrix, this.angle2);\r\n const scale = Params.getTransformPatternScale(transform);\r\n this.scale = this.scale ? this.scale * scale : scale;\r\n } else if (this.defLines) {\r\n const scale = Params.getTransformPatternScale(transform);\r\n if (!Geometry.isSameCoordinate(scale, 1.0)) {\r\n this.scale = this.scale ? this.scale * scale : scale;\r\n for (const line of this.defLines) {\r\n if (line.through) {\r\n line.through.x *= scale;\r\n line.through.y *= scale;\r\n }\r\n if (line.offset) {\r\n line.offset.x *= scale;\r\n line.offset.y *= scale;\r\n }\r\n if (line.dashes) {\r\n for (let iDash = 0; iDash < line.dashes.length; iDash++)\r\n line.dashes[iDash] *= scale;\r\n }\r\n }\r\n }\r\n } else {\r\n this.space1 = Params.transformPatternSpace(transform, this.space1 ? this.space1 : 0.0, rMatrix, this.angle1);\r\n if (this.space2 && 0 !== this.space2)\r\n this.space2 = Params.transformPatternSpace(transform, this.space2, rMatrix, this.angle2);\r\n }\r\n\r\n origin = transform.multiplyPoint3d(origin);\r\n rMatrix.multiplyMatrixMatrix(transform.matrix, rMatrix);\r\n const normalized = Matrix3d.createRigidFromMatrix3d(rMatrix);\r\n if (!normalized)\r\n return false;\r\n const newRotation = YawPitchRollAngles.createFromMatrix3d(normalized);\r\n if (undefined === newRotation)\r\n return false;\r\n this.origin = origin;\r\n this.rotation = newRotation;\r\n return true;\r\n }\r\n }\r\n}\r\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BoundingSphere.js","sourceRoot":"","sources":["../../../src/geometry/BoundingSphere.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAA0D;AAE1D;;;;GAIG;AACH,MAAa,cAAc;IACzB,6CAA6C;IACtC,MAAM,CAAU;IACvB,gCAAgC;IACzB,MAAM,CAAS;IAEtB,yEAAyE;IACzE,YAAY,SAAkB,uBAAO,CAAC,UAAU,EAAE,EAAE,MAAM,GAAG,CAAC;QAC5D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,kDAAkD;IAC3C,IAAI,CAAC,MAAe,EAAE,MAAc;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,WAAW,CAAC,SAAoB,EAAE,MAAuB;QAC9D,MAAM,GAAG,MAAM,IAAI,IAAI,cAAc,EAAE,CAAC;QACxC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QACtD,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC;QAClK,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,6DAA6D;IACtD,gBAAgB,CAAC,SAAoB;QAC1C,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;CACF;AAlCD,wCAkCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Geometry\n */\n\nimport { Point3d, Transform } from \"@itwin/core-geometry\";\n\n/** Describes a spherical volume of space as an approximation of the shape of some more complex geometric entity fully contained within that volume.\n * When performing tests for intersection or containment, the approximation can be used as a first, quick check.\n * @see [[FrustumPlanes.computeContainment]], for example.\n * @public\n */\nexport class BoundingSphere {\n /** The point at the center of the sphere. */\n public center: Point3d;\n /** The radius of the sphere. */\n public radius: number;\n\n /** Create a new bounding sphere with the specified center and radius. */\n constructor(center: Point3d = Point3d.createZero(), radius = 0) {\n this.center = center;\n this.radius = radius;\n }\n\n /** Change the center and radius of the sphere. */\n public init(center: Point3d, radius: number): void {\n this.center = center;\n this.radius = radius;\n }\n\n /** Applies the specified transformation matrix to produce a new bounding sphere.\n * @param transform The transformation matrix to apply.\n * @param result An optional preallocated object to hold the result, to avoid allocating a new object. May be the same object as `this`.\n * @returns A bounding sphere equivalent to `this` with the specified transform applied.\n */\n public transformBy(transform: Transform, result?: BoundingSphere): BoundingSphere {\n result = result ?? new BoundingSphere();\n transform.multiplyPoint3d(this.center, result.center);\n result.radius = this.radius * Math.max(transform.matrix.columnXMagnitude(), Math.max(transform.matrix.columnYMagnitude(), (transform.matrix.columnZMagnitude())));\n return result;\n }\n\n /** Apply the specified transform to this bounding sphere. */\n public transformInPlace(transform: Transform): void {\n this.transformBy(transform, this);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"BoundingSphere.js","sourceRoot":"","sources":["../../../src/geometry/BoundingSphere.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAA0D;AAE1D;;;;GAIG;AACH,MAAa,cAAc;IACzB,6CAA6C;IACtC,MAAM,CAAU;IACvB,gCAAgC;IACzB,MAAM,CAAS;IAEtB,yEAAyE;IACzE,YAAY,SAAkB,uBAAO,CAAC,UAAU,EAAE,EAAE,MAAM,GAAG,CAAC;QAC5D,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,kDAAkD;IAC3C,IAAI,CAAC,MAAe,EAAE,MAAc;QACzC,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED;;;;OAIG;IACI,WAAW,CAAC,SAAoB,EAAE,MAAuB;QAC9D,MAAM,GAAG,MAAM,IAAI,IAAI,cAAc,EAAE,CAAC;QACxC,SAAS,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QACtD,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,CAAC;QAClK,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,6DAA6D;IACtD,gBAAgB,CAAC,SAAoB;QAC1C,IAAI,CAAC,WAAW,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;CACF;AAlCD,wCAkCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Geometry\r\n */\r\n\r\nimport { Point3d, Transform } from \"@itwin/core-geometry\";\r\n\r\n/** Describes a spherical volume of space as an approximation of the shape of some more complex geometric entity fully contained within that volume.\r\n * When performing tests for intersection or containment, the approximation can be used as a first, quick check.\r\n * @see [[FrustumPlanes.computeContainment]], for example.\r\n * @public\r\n */\r\nexport class BoundingSphere {\r\n /** The point at the center of the sphere. */\r\n public center: Point3d;\r\n /** The radius of the sphere. */\r\n public radius: number;\r\n\r\n /** Create a new bounding sphere with the specified center and radius. */\r\n constructor(center: Point3d = Point3d.createZero(), radius = 0) {\r\n this.center = center;\r\n this.radius = radius;\r\n }\r\n\r\n /** Change the center and radius of the sphere. */\r\n public init(center: Point3d, radius: number): void {\r\n this.center = center;\r\n this.radius = radius;\r\n }\r\n\r\n /** Applies the specified transformation matrix to produce a new bounding sphere.\r\n * @param transform The transformation matrix to apply.\r\n * @param result An optional preallocated object to hold the result, to avoid allocating a new object. May be the same object as `this`.\r\n * @returns A bounding sphere equivalent to `this` with the specified transform applied.\r\n */\r\n public transformBy(transform: Transform, result?: BoundingSphere): BoundingSphere {\r\n result = result ?? new BoundingSphere();\r\n transform.multiplyPoint3d(this.center, result.center);\r\n result.radius = this.radius * Math.max(transform.matrix.columnXMagnitude(), Math.max(transform.matrix.columnYMagnitude(), (transform.matrix.columnZMagnitude())));\r\n return result;\r\n }\r\n\r\n /** Apply the specified transform to this bounding sphere. */\r\n public transformInPlace(transform: Transform): void {\r\n this.transformBy(transform, this);\r\n }\r\n}\r\n"]}
|