@itwin/core-common 5.1.0-dev.4 → 5.1.0-dev.40
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 +37 -1
- package/lib/cjs/BackgroundMapSettings.d.ts +2 -2
- package/lib/cjs/BackgroundMapSettings.js.map +1 -1
- package/lib/cjs/ClipStyle.d.ts +1 -1
- package/lib/cjs/ClipStyle.d.ts.map +1 -1
- package/lib/cjs/ClipStyle.js.map +1 -1
- package/lib/cjs/ConcurrentQuery.d.ts +3 -3
- package/lib/cjs/ConcurrentQuery.js +1 -1
- package/lib/cjs/ConcurrentQuery.js.map +1 -1
- package/lib/cjs/ElementProps.d.ts +42 -42
- package/lib/cjs/ElementProps.js +6 -6
- package/lib/cjs/ElementProps.js.map +1 -1
- package/lib/cjs/EntityProps.d.ts +4 -4
- package/lib/cjs/EntityProps.js.map +1 -1
- package/lib/cjs/GeometryParams.d.ts +3 -1
- package/lib/cjs/GeometryParams.d.ts.map +1 -1
- package/lib/cjs/GeometryParams.js +3 -1
- package/lib/cjs/GeometryParams.js.map +1 -1
- package/lib/cjs/GraphicParams.d.ts +1 -0
- package/lib/cjs/GraphicParams.d.ts.map +1 -1
- package/lib/cjs/GraphicParams.js +1 -0
- package/lib/cjs/GraphicParams.js.map +1 -1
- package/lib/cjs/ITwinCoreErrors.d.ts +1 -1
- package/lib/cjs/ITwinCoreErrors.d.ts.map +1 -1
- package/lib/cjs/ITwinCoreErrors.js.map +1 -1
- package/lib/cjs/MassProperties.d.ts +2 -2
- package/lib/cjs/MassProperties.js.map +1 -1
- package/lib/cjs/MaterialProps.d.ts +1 -1
- package/lib/cjs/MaterialProps.js.map +1 -1
- package/lib/cjs/TerrainSettings.d.ts +1 -1
- package/lib/cjs/TerrainSettings.d.ts.map +1 -1
- package/lib/cjs/TerrainSettings.js.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.d.ts +33 -1
- package/lib/cjs/annotation/TextAnnotation.d.ts.map +1 -1
- package/lib/cjs/annotation/TextAnnotation.js +18 -4
- package/lib/cjs/annotation/TextAnnotation.js.map +1 -1
- package/lib/cjs/annotation/TextBlockGeometryProps.d.ts +1 -1
- package/lib/cjs/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.d.ts +1 -1
- package/lib/cjs/geometry/ElementGeometry.d.ts.map +1 -1
- package/lib/cjs/geometry/ElementGeometry.js +2 -2
- package/lib/cjs/geometry/ElementGeometry.js.map +1 -1
- package/lib/cjs/internal/BackendTypes.d.ts +3 -3
- package/lib/cjs/internal/BackendTypes.d.ts.map +1 -1
- package/lib/cjs/internal/BackendTypes.js.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.d.ts +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.d.ts.map +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js +1 -1
- package/lib/cjs/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.d.ts +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js +1 -1
- package/lib/cjs/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.d.ts +6 -6
- package/lib/cjs/rpc/core/RpcConstants.d.ts.map +1 -1
- package/lib/cjs/rpc/core/RpcConstants.js +6 -6
- package/lib/cjs/rpc/core/RpcConstants.js.map +1 -1
- package/lib/cjs/rpc/web/OpenAPI.d.ts +1 -1
- package/lib/cjs/rpc/web/OpenAPI.js.map +1 -1
- package/lib/cjs/rpc/web/WebAppRpcProtocol.d.ts +2 -2
- package/lib/cjs/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/cjs/tile/IModelTileIO.d.ts +2 -2
- package/lib/cjs/tile/IModelTileIO.js +2 -2
- package/lib/cjs/tile/IModelTileIO.js.map +1 -1
- package/lib/cjs/tile/TileMetadata.d.ts +6 -2
- package/lib/cjs/tile/TileMetadata.d.ts.map +1 -1
- package/lib/cjs/tile/TileMetadata.js +10 -4
- package/lib/cjs/tile/TileMetadata.js.map +1 -1
- package/lib/esm/BackgroundMapSettings.d.ts +2 -2
- package/lib/esm/BackgroundMapSettings.js.map +1 -1
- package/lib/esm/ClipStyle.d.ts +1 -1
- package/lib/esm/ClipStyle.d.ts.map +1 -1
- package/lib/esm/ClipStyle.js.map +1 -1
- package/lib/esm/ConcurrentQuery.d.ts +3 -3
- package/lib/esm/ConcurrentQuery.js +1 -1
- package/lib/esm/ConcurrentQuery.js.map +1 -1
- package/lib/esm/ElementProps.d.ts +42 -42
- package/lib/esm/ElementProps.js +6 -6
- package/lib/esm/ElementProps.js.map +1 -1
- package/lib/esm/EntityProps.d.ts +4 -4
- package/lib/esm/EntityProps.js.map +1 -1
- package/lib/esm/GeometryParams.d.ts +3 -1
- package/lib/esm/GeometryParams.d.ts.map +1 -1
- package/lib/esm/GeometryParams.js +3 -1
- package/lib/esm/GeometryParams.js.map +1 -1
- package/lib/esm/GraphicParams.d.ts +1 -0
- package/lib/esm/GraphicParams.d.ts.map +1 -1
- package/lib/esm/GraphicParams.js +1 -0
- package/lib/esm/GraphicParams.js.map +1 -1
- package/lib/esm/ITwinCoreErrors.d.ts +1 -1
- package/lib/esm/ITwinCoreErrors.d.ts.map +1 -1
- package/lib/esm/ITwinCoreErrors.js.map +1 -1
- package/lib/esm/MassProperties.d.ts +2 -2
- package/lib/esm/MassProperties.js.map +1 -1
- package/lib/esm/MaterialProps.d.ts +1 -1
- package/lib/esm/MaterialProps.js.map +1 -1
- package/lib/esm/TerrainSettings.d.ts +1 -1
- package/lib/esm/TerrainSettings.d.ts.map +1 -1
- package/lib/esm/TerrainSettings.js.map +1 -1
- package/lib/esm/annotation/TextAnnotation.d.ts +33 -1
- package/lib/esm/annotation/TextAnnotation.d.ts.map +1 -1
- package/lib/esm/annotation/TextAnnotation.js +18 -4
- package/lib/esm/annotation/TextAnnotation.js.map +1 -1
- package/lib/esm/annotation/TextBlockGeometryProps.d.ts +1 -1
- package/lib/esm/annotation/TextBlockGeometryProps.js.map +1 -1
- package/lib/esm/geometry/ElementGeometry.d.ts +1 -1
- package/lib/esm/geometry/ElementGeometry.d.ts.map +1 -1
- package/lib/esm/geometry/ElementGeometry.js +2 -2
- package/lib/esm/geometry/ElementGeometry.js.map +1 -1
- package/lib/esm/internal/BackendTypes.d.ts +3 -3
- package/lib/esm/internal/BackendTypes.d.ts.map +1 -1
- package/lib/esm/internal/BackendTypes.js.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.d.ts +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.d.ts.map +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js +1 -1
- package/lib/esm/rpc/IModelReadRpcInterface.js.map +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.d.ts +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js +1 -1
- package/lib/esm/rpc/SnapshotIModelRpcInterface.js.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.d.ts +6 -6
- package/lib/esm/rpc/core/RpcConstants.d.ts.map +1 -1
- package/lib/esm/rpc/core/RpcConstants.js +6 -6
- package/lib/esm/rpc/core/RpcConstants.js.map +1 -1
- package/lib/esm/rpc/web/OpenAPI.d.ts +1 -1
- package/lib/esm/rpc/web/OpenAPI.js.map +1 -1
- package/lib/esm/rpc/web/WebAppRpcProtocol.d.ts +2 -2
- package/lib/esm/rpc/web/WebAppRpcProtocol.js.map +1 -1
- package/lib/esm/tile/IModelTileIO.d.ts +2 -2
- package/lib/esm/tile/IModelTileIO.js +2 -2
- package/lib/esm/tile/IModelTileIO.js.map +1 -1
- package/lib/esm/tile/TileMetadata.d.ts +6 -2
- package/lib/esm/tile/TileMetadata.d.ts.map +1 -1
- package/lib/esm/tile/TileMetadata.js +10 -4
- package/lib/esm/tile/TileMetadata.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAn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AK,KAAK,CAAC,MAAM,CAAC,QAAQ;eACtG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC;eAC5F,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;IAC9C,CAAC;CACF;AAxHD,wCAwHC","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 { Point3d, Range2d, Transform, XYZProps, YawPitchRollAngles, YawPitchRollProps } from \"@itwin/core-geometry\";\nimport { TextBlock, TextBlockProps } from \"./TextBlock\";\n\n/** Describes how to compute the \"anchor point\" for a [[TextAnnotation]].\n * The anchor point is a point on or inside of the 2d bounding box enclosing the contents of the annotation's [[TextBlock]].\n * The annotation can be rotated and translated relative to the anchor point. The anchor point also serves as the snap point\n * when [AccuSnap]($frontend) is set to [SnapMode.Origin]($frontend).\n * [[TextAnnotation.computeTransform]] will align the anchor point with (0, 0).\n * @see [[TextAnnotation]] for a description of how the anchor point is computed.\n * @beta\n */\nexport interface TextAnnotationAnchor {\n /**\n * The vertical alignment of the anchor point.\n * \"top\" aligns the anchor point with the top of the text's bounding box.\n * \"middle\" aligns the anchor point with the middle of the text's bounding box.\n * \"bottom\" aligns the anchor point with the bottom of the text's bounding box.\n */\n vertical: \"top\" | \"middle\" | \"bottom\";\n\n /**\n * The horizontal alignment of the anchor point.\n * \"left\" aligns the anchor point with left side of the text's bounding box.\n * \"center\" aligns the anchor point with center of the text with's bounding box.\n * \"right\" aligns the anchor point with right side of the text's bounding box.\n */\n horizontal: \"left\" | \"center\" | \"right\";\n}\n\n/**\n * JSON representation of a [[TextAnnotation]].\n * @beta\n */\nexport interface TextAnnotationProps {\n /** See [[TextAnnotation.offset]]. Default: [0, 0, 0]. */\n offset?: XYZProps;\n /** See [[TextAnnotation.orientation]]. Default: no rotation. */\n orientation?: YawPitchRollProps;\n /** See [[TextAnnotation.textBlock]]. Default: an empty text block. */\n textBlock?: TextBlockProps;\n /** See [[TextAnnotation.anchor]]. Default: top-left. */\n anchor?: TextAnnotationAnchor;\n}\n\n/** Arguments supplied to [[TextAnnotation.create]].\n * @beta\n */\nexport interface TextAnnotationCreateArgs {\n /** See [[TextAnnotation.offset]]. Default: (0, 0, 0). */\n offset?: Point3d;\n /** See [[TextAnnotation.orientation]]. Default: no rotation. */\n orientation?: YawPitchRollAngles;\n /** See [[TextAnnotation.textBlock]]. Default: an empty text block. */\n textBlock?: TextBlock;\n /** See [[TextAnnotation.anchor]]. Default: top-left. */\n anchor?: TextAnnotationAnchor;\n}\n\n/**\n * Represents a formatted block of text positioned in 2d or 3d space.\n * [TextAnnotation2d]($backend) and [TextAnnotation3d]($backend) elements store a single TextAnnotation from which their geometric representation is generated.\n * Other types of elements may store multiple TextAnnotations, positioned relative to one another.\n * The annotation's position and orientation relative to the host element's [Placement]($common) is determined as follows:\n * - First, a bounding box is computed enclosing the contents of the [[textBlock].\n * - Then, an \"anchor point\" is computed based on the bounding box and the [[anchor]] property. The anchor point can be at one of the four corners of the box, in the middle of one of its four\n * edges, or in the center of the box.\n * - The [[orientation]] is applied to rotate the box around the anchor point.\n * - Finally, the [[offset]] is added to the anchor point to apply translation.\n * @see [produceTextAnnotationGeometry]($backend) to decompose the annotation into a set of geometric primitives suitable for use with [[GeometryStreamBuilder.appendTextBlock]].\n * @beta\n */\nexport class TextAnnotation {\n /** The rotation of the annotation.\n * @note When defining an annotation for a [TextAnnotation2d]($backend), only the `yaw` component (rotation around the Z axis) is used.\n */\n public orientation: YawPitchRollAngles;\n /** The formatted document. */\n public textBlock: TextBlock;\n /** Describes how to compute the [[textBlock]]'s anchor point. */\n public anchor: TextAnnotationAnchor;\n /** An offset applied to the anchor point that can be used to position annotations within the same geometry stream relative to one another. */\n public offset: Point3d;\n\n private constructor(offset: Point3d, angles: YawPitchRollAngles, textBlock: TextBlock, anchor: TextAnnotationAnchor) {\n this.offset = offset;\n this.orientation = angles;\n this.textBlock = textBlock;\n this.anchor = anchor;\n }\n\n /** Creates a new TextAnnotation. */\n public static create(args?: TextAnnotationCreateArgs): TextAnnotation {\n const offset = args?.offset ?? new Point3d();\n const angles = args?.orientation ?? new YawPitchRollAngles();\n const textBlock = args?.textBlock ?? TextBlock.createEmpty();\n const anchor = args?.anchor ?? { vertical: \"top\", horizontal: \"left\" };\n\n return new TextAnnotation(offset, angles, textBlock, anchor);\n }\n\n /**\n * Creates a new TextAnnotation instance from its JSON representation.\n */\n public static fromJSON(props: TextAnnotationProps | undefined): TextAnnotation {\n return TextAnnotation.create({\n offset: props?.offset ? Point3d.fromJSON(props.offset) : undefined,\n orientation: props?.orientation ? YawPitchRollAngles.fromJSON(props.orientation) : undefined,\n textBlock: props?.textBlock ? TextBlock.create(props.textBlock) : undefined,\n anchor: props?.anchor ? { ...props.anchor } : undefined,\n });\n }\n\n /**\n * Converts this annotation to its JSON representation.\n */\n public toJSON(): TextAnnotationProps {\n const props: TextAnnotationProps = {};\n\n // Even if the text block is empty, we want to record its style name and overrides, e.g.,\n // so the user can pick up where they left off editing it next time.\n props.textBlock = this.textBlock.toJSON();\n\n if (!this.offset.isZero) {\n props.offset = this.offset.toJSON();\n }\n\n if (!this.orientation.isIdentity()) {\n props.orientation = this.orientation.toJSON();\n }\n\n if (this.anchor.vertical !== \"top\" || this.anchor.horizontal !== \"left\") {\n props.anchor = { ...this.anchor };\n }\n\n return props;\n }\n\n /** Compute the transform that positions and orients this annotation relative to its anchor point, based on the [[textBlock]]'s computed bounding box.\n * The anchor point is computed as specified by this annotation's [[anchor]] setting. For example, if the text block is anchored\n * at the bottom left, then the transform will be relative to the bottom-left corner of `textBlockExtents`.\n * The text block will be rotated around the fixed anchor point according to [[orientation]], then translated by [[offset]].\n * The anchor point will coincide with (0, 0, 0) unless an [[offset]] is present.\n * @param boundingBox A box fully containing the [[textBlock]]. This range should include the margins.\n * @see [[computeAnchorPoint]] to compute the transform's anchor point.\n * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.\n */\n public computeTransform(boundingBox: Range2d): Transform {\n const anchorPt = this.computeAnchorPoint(boundingBox);\n const matrix = this.orientation.toMatrix3d();\n\n const rotation = Transform.createFixedPointAndMatrix(anchorPt, matrix);\n const translation = Transform.createTranslation(this.offset.minus(anchorPt));\n\n return translation.multiplyTransformTransform(rotation, rotation);\n }\n\n /** Compute the anchor point of this annotation as specified by [[anchor]].\n * @param boundingBox A box fully containing the [[textBlock]].\n * @see [[computeTransform]] to compute the transform relative to the anchor point.\n */\n public computeAnchorPoint(boundingBox: Range2d): Point3d {\n let x = boundingBox.low.x;\n let y = boundingBox.high.y;\n\n switch (this.anchor.horizontal) {\n case \"center\":\n x += boundingBox.xLength() / 2;\n break;\n case \"right\":\n x += boundingBox.xLength();\n break;\n }\n\n switch (this.anchor.vertical) {\n case \"middle\":\n y -= boundingBox.yLength() / 2;\n break;\n case \"bottom\":\n y -= boundingBox.yLength();\n break;\n }\n\n return new Point3d(x, y, 0);\n }\n\n /** Returns true if this annotation is logically equivalent to `other`. */\n public equals(other: TextAnnotation): boolean {\n return this.anchor.horizontal === other.anchor.horizontal && this.anchor.vertical === other.anchor.vertical\n && this.orientation.isAlmostEqual(other.orientation) && this.offset.isAlmostEqual(other.offset)\n && this.textBlock.equals(other.textBlock);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TextAnnotation.js","sourceRoot":"","sources":["../../../src/annotation/TextAnnotation.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,wDAAoH;AACpH,2CAAwD;AA2FxD;;;;;;;;;;;;GAYG;AACH,MAAa,cAAc;IACzB;;OAEG;IACI,WAAW,CAAqB;IACvC,8BAA8B;IACvB,SAAS,CAAY;IAC5B,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,OAAO,EAAE,GAAG,CAAC,CAAC;gBAC/B,MAAM;YACR,KAAK,QAAQ;gBACX,CAAC,IAAI,WAAW,CAAC,OAAO,EAAE,CAAC;gBAC3B,MAAM;QACV,CAAC;QAED,OAAO,IAAI,uBAAO,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC9B,CAAC;IAED,0EAA0E;IACnE,MAAM,CAAC,KAAqB;QACjC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE,KAAK,KAAK,KAAK,CAAC,KAAK,EAAE,KAAK;eACvD,IAAI,CAAC,KAAK,EAAE,IAAI,KAAK,KAAK,CAAC,KAAK,EAAE,IAAI;eACtC,IAAI,CAAC,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,KAAK,EAAE,MAAM;eAC1C,IAAI,CAAC,KAAK,EAAE,YAAY,KAAK,KAAK,CAAC,KAAK,EAAE,YAAY,CAAC;QAE5D,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,KAAK,KAAK,CAAC,MAAM,CAAC,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,QAAQ,KAAK,KAAK,CAAC,MAAM,CAAC,QAAQ;eACtG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC;eAC5F,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC;eACtC,WAAW,CAAC;IACnB,CAAC;CACF;AAxID,wCAwIC","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 { Point3d, Range2d, Transform, XYZProps, YawPitchRollAngles, YawPitchRollProps } from \"@itwin/core-geometry\";\nimport { TextBlock, TextBlockProps } from \"./TextBlock\";\nimport { TextStyleColor } from \"./TextStyle\";\n\n/** Describes how to compute the \"anchor point\" for a [[TextAnnotation]].\n * The anchor point is a point on or inside of the 2d bounding box enclosing the contents of the annotation's [[TextBlock]].\n * The annotation can be rotated and translated relative to the anchor point. The anchor point also serves as the snap point\n * when [AccuSnap]($frontend) is set to [SnapMode.Origin]($frontend).\n * [[TextAnnotation.computeTransform]] will align the anchor point with (0, 0).\n * @see [[TextAnnotation]] for a description of how the anchor point is computed.\n * @beta\n */\nexport interface TextAnnotationAnchor {\n /**\n * The vertical alignment of the anchor point.\n * \"top\" aligns the anchor point with the top of the text's bounding box.\n * \"middle\" aligns the anchor point with the middle of the text's bounding box.\n * \"bottom\" aligns the anchor point with the bottom of the text's bounding box.\n */\n vertical: \"top\" | \"middle\" | \"bottom\";\n\n /**\n * The horizontal alignment of the anchor point.\n * \"left\" aligns the anchor point with left side of the text's bounding box.\n * \"center\" aligns the anchor point with center of the text with's bounding box.\n * \"right\" aligns the anchor point with right side of the text's bounding box.\n */\n horizontal: \"left\" | \"center\" | \"right\";\n}\n\n/** Set of predefined shapes that can be computed and drawn around the margins of a [[TextBlock]]\n * @beta\n*/\nexport type TextAnnotationFrameShape = \"none\" | \"line\" | \"rectangle\" | \"circle\" | \"equilateralTriangle\" | \"diamond\" | \"square\" | \"pentagon\" | \"hexagon\" | \"octagon\" | \"capsule\" | \"roundedRectangle\";\n\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 * @beta\n */\nexport type TextAnnotationFillColor = TextStyleColor | \"background\";\n\n/**\n * Describes how to draw the frame around a [[TextBlock]].\n * The frame can be a simple line, a filled shape, or both.\n * @beta\n */\nexport interface TextFrameStyleProps {\n /** Shape of the frame. Default: \"rectangle\" */\n shape?: TextAnnotationFrameShape;\n /** The color to fill the shape of the text frame. This fill will is applied using [[FillDisplay.Blanking]]. Default: no fill */\n fill?: TextAnnotationFillColor;\n /** The color of the text frame's outline. Default: black */\n border?: 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/**\n * JSON representation of a [[TextAnnotation]].\n * @beta\n */\nexport interface TextAnnotationProps {\n /** See [[TextAnnotation.offset]]. Default: [0, 0, 0]. */\n offset?: XYZProps;\n /** See [[TextAnnotation.orientation]]. Default: no rotation. */\n orientation?: YawPitchRollProps;\n /** See [[TextAnnotation.textBlock]]. Default: an empty text block. */\n textBlock?: TextBlockProps;\n /** See [[TextAnnotation.anchor]]. Default: top-left. */\n anchor?: TextAnnotationAnchor;\n /** See [[TextAnnotation.frame]]. Default: no frame */\n frame?: TextFrameStyleProps\n}\n\n/** Arguments supplied to [[TextAnnotation.create]].\n * @beta\n */\nexport interface TextAnnotationCreateArgs {\n /** See [[TextAnnotation.offset]]. Default: (0, 0, 0). */\n offset?: Point3d;\n /** See [[TextAnnotation.orientation]]. Default: no rotation. */\n orientation?: YawPitchRollAngles;\n /** See [[TextAnnotation.textBlock]]. Default: an empty text block. */\n textBlock?: TextBlock;\n /** See [[TextAnnotation.anchor]]. Default: top-left. */\n anchor?: TextAnnotationAnchor;\n /** See [[TextAnnotation.frame]]. Default: no frame */\n frame?: TextFrameStyleProps\n}\n\n/**\n * Represents a formatted block of text positioned in 2d or 3d space.\n * [TextAnnotation2d]($backend) and [TextAnnotation3d]($backend) elements store a single TextAnnotation from which their geometric representation is generated.\n * Other types of elements may store multiple TextAnnotations, positioned relative to one another.\n * The annotation's position and orientation relative to the host element's [Placement]($common) is determined as follows:\n * - First, a bounding box is computed enclosing the contents of the [[textBlock].\n * - Then, an \"anchor point\" is computed based on the bounding box and the [[anchor]] property. The anchor point can be at one of the four corners of the box, in the middle of one of its four\n * edges, or in the center of the box.\n * - The [[orientation]] is applied to rotate the box around the anchor point.\n * - Finally, the [[offset]] is added to the anchor point to apply translation.\n * @see [appendTextAnnotationGeometry]($backend) to construct the geometry and append it to an [[ElementGeometry.Builder]].\n * @beta\n */\nexport class TextAnnotation {\n /** The rotation of the annotation.\n * @note When defining an annotation for a [TextAnnotation2d]($backend), only the `yaw` component (rotation around the Z axis) is used.\n */\n public orientation: YawPitchRollAngles;\n /** The formatted document. */\n public textBlock: TextBlock;\n /** Describes how to compute the [[textBlock]]'s anchor point. */\n public anchor: TextAnnotationAnchor;\n /** An offset applied to the anchor point that can be used to position annotations within the same geometry stream relative to one another. */\n public offset: Point3d;\n /** The frame settings of the text annotation. */\n public frame?: TextFrameStyleProps;\n\n private constructor(offset: Point3d, angles: YawPitchRollAngles, textBlock: TextBlock, anchor: TextAnnotationAnchor, frame?: TextFrameStyleProps) {\n this.offset = offset;\n this.orientation = angles;\n this.textBlock = textBlock;\n this.anchor = anchor;\n this.frame = frame\n }\n\n /** Creates a new TextAnnotation. */\n public static create(args?: TextAnnotationCreateArgs): TextAnnotation {\n const offset = args?.offset ?? new Point3d();\n const angles = args?.orientation ?? new YawPitchRollAngles();\n const textBlock = args?.textBlock ?? TextBlock.createEmpty();\n const anchor = args?.anchor ?? { vertical: \"top\", horizontal: \"left\" };\n // If the user supplies a frame, but doesn't supply a shape, default the shape to \"rectangle\"\n const shape: TextAnnotationFrameShape = args?.frame?.shape ?? \"rectangle\";\n const frame = args?.frame ? { shape, ...args.frame } : undefined;\n\n return new TextAnnotation(offset, angles, textBlock, anchor, frame);\n }\n\n /**\n * Creates a new TextAnnotation instance from its JSON representation.\n */\n public static fromJSON(props: TextAnnotationProps | undefined): TextAnnotation {\n return TextAnnotation.create({\n offset: props?.offset ? Point3d.fromJSON(props.offset) : undefined,\n orientation: props?.orientation ? YawPitchRollAngles.fromJSON(props.orientation) : undefined,\n textBlock: props?.textBlock ? TextBlock.create(props.textBlock) : undefined,\n anchor: props?.anchor ? { ...props.anchor } : undefined,\n frame: props?.frame ? { shape: \"rectangle\", ...props.frame } : undefined,\n });\n }\n\n /**\n * Converts this annotation to its JSON representation.\n */\n public toJSON(): TextAnnotationProps {\n const props: TextAnnotationProps = {};\n\n // Even if the text block is empty, we want to record its style name and overrides, e.g.,\n // so the user can pick up where they left off editing it next time.\n props.textBlock = this.textBlock.toJSON();\n\n if (!this.offset.isZero) {\n props.offset = this.offset.toJSON();\n }\n\n if (!this.orientation.isIdentity()) {\n props.orientation = this.orientation.toJSON();\n }\n\n if (this.anchor.vertical !== \"top\" || this.anchor.horizontal !== \"left\") {\n props.anchor = { ...this.anchor };\n }\n\n // Default frame to \"none\"\n props.frame = this.frame ? { ...this.frame } : undefined;\n\n return props;\n }\n\n /** Compute the transform that positions and orients this annotation relative to its anchor point, based on the [[textBlock]]'s computed bounding box.\n * The anchor point is computed as specified by this annotation's [[anchor]] setting. For example, if the text block is anchored\n * at the bottom left, then the transform will be relative to the bottom-left corner of `textBlockExtents`.\n * The text block will be rotated around the fixed anchor point according to [[orientation]], then translated by [[offset]].\n * The anchor point will coincide with (0, 0, 0) unless an [[offset]] is present.\n * @param boundingBox A box fully containing the [[textBlock]]. This range should include the margins.\n * @see [[computeAnchorPoint]] to compute the transform's anchor point.\n * @see [computeLayoutTextBlockResult]($backend) to lay out a `TextBlock`.\n */\n public computeTransform(boundingBox: Range2d): Transform {\n const anchorPt = this.computeAnchorPoint(boundingBox);\n const matrix = this.orientation.toMatrix3d();\n\n const rotation = Transform.createFixedPointAndMatrix(anchorPt, matrix);\n const translation = Transform.createTranslation(this.offset.minus(anchorPt));\n\n return translation.multiplyTransformTransform(rotation, rotation);\n }\n\n /** Compute the anchor point of this annotation as specified by [[anchor]].\n * @param boundingBox A box fully containing the [[textBlock]].\n * @see [[computeTransform]] to compute the transform relative to the anchor point.\n */\n public computeAnchorPoint(boundingBox: Range2d): Point3d {\n let x = boundingBox.low.x;\n let y = boundingBox.high.y;\n\n switch (this.anchor.horizontal) {\n case \"center\":\n x += boundingBox.xLength() / 2;\n break;\n case \"right\":\n x += boundingBox.xLength();\n break;\n }\n\n switch (this.anchor.vertical) {\n case \"middle\":\n y -= boundingBox.yLength() / 2;\n break;\n case \"bottom\":\n y -= boundingBox.yLength();\n break;\n }\n\n return new Point3d(x, y, 0);\n }\n\n /** Returns true if this annotation is logically equivalent to `other`. */\n public equals(other: TextAnnotation): boolean {\n const framesMatch = this.frame?.shape === other.frame?.shape\n && this.frame?.fill === other.frame?.fill\n && this.frame?.border === other.frame?.border\n && this.frame?.borderWeight === other.frame?.borderWeight;\n\n return this.anchor.horizontal === other.anchor.horizontal && this.anchor.vertical === other.anchor.vertical\n && this.orientation.isAlmostEqual(other.orientation) && this.offset.isAlmostEqual(other.offset)\n && this.textBlock.equals(other.textBlock)\n && framesMatch;\n }\n}\n"]}
|
|
@@ -29,7 +29,7 @@ export type TextBlockGeometryPropsEntry = {
|
|
|
29
29
|
};
|
|
30
30
|
/**
|
|
31
31
|
* JSON representation of the geometric primitives that can be used to display a [[TextBlock]].
|
|
32
|
-
* @see [
|
|
32
|
+
* @see [appendTextAnnotationGeometry]($backend) to convert an annotation to its geometric representation.
|
|
33
33
|
* @see [[GeometryStreamBuilder.appendTextBlock]] to add a block of text to a [GeometryStream]($docs/learning/common/GeometryStream.md).
|
|
34
34
|
* @beta
|
|
35
35
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBlockGeometryProps.js","sourceRoot":"","sources":["../../../src/annotation/TextBlockGeometryProps.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 Annotation\n */\n\nimport { XYZProps } from \"@itwin/core-geometry\";\nimport { TextStringProps } from \"../geometry/TextString\";\nimport { TextStyleColor } from \"./TextStyle\";\n\n/**\n * A single entry in a [[TextBlockGeometryProps]], representing one of the following primitive types:\n * - A [[TextString]],\n * - A fraction separator described by a [LineSegment3d]($geometry), or\n * - A change in color, to be applied to all subsequent primitives.\n * @beta\n */\nexport type TextBlockGeometryPropsEntry = {\n text: TextStringProps;\n separator?: never;\n color?: never;\n} | {\n text?: never;\n separator: {\n startPoint: XYZProps;\n endPoint: XYZProps;\n };\n color?: never;\n} | {\n text?: never;\n separator?: never;\n color: TextStyleColor;\n};\n\n/**\n * JSON representation of the geometric primitives that can be used to display a [[TextBlock]].\n * @see [
|
|
1
|
+
{"version":3,"file":"TextBlockGeometryProps.js","sourceRoot":"","sources":["../../../src/annotation/TextBlockGeometryProps.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 Annotation\n */\n\nimport { XYZProps } from \"@itwin/core-geometry\";\nimport { TextStringProps } from \"../geometry/TextString\";\nimport { TextStyleColor } from \"./TextStyle\";\n\n/**\n * A single entry in a [[TextBlockGeometryProps]], representing one of the following primitive types:\n * - A [[TextString]],\n * - A fraction separator described by a [LineSegment3d]($geometry), or\n * - A change in color, to be applied to all subsequent primitives.\n * @beta\n */\nexport type TextBlockGeometryPropsEntry = {\n text: TextStringProps;\n separator?: never;\n color?: never;\n} | {\n text?: never;\n separator: {\n startPoint: XYZProps;\n endPoint: XYZProps;\n };\n color?: never;\n} | {\n text?: never;\n separator?: never;\n color: TextStyleColor;\n};\n\n/**\n * JSON representation of the geometric primitives that can be used to display a [[TextBlock]].\n * @see [appendTextAnnotationGeometry]($backend) to convert an annotation to its geometric representation.\n * @see [[GeometryStreamBuilder.appendTextBlock]] to add a block of text to a [GeometryStream]($docs/learning/common/GeometryStream.md).\n * @beta\n */\nexport interface TextBlockGeometryProps {\n /** The set of geometric primitives representing the contents of the [[TextBlock]]. */\n entries: TextBlockGeometryPropsEntry[];\n}\n"]}
|
|
@@ -310,7 +310,7 @@ export declare namespace ElementGeometry {
|
|
|
310
310
|
/** Append a series of entries representing a [[TextBlock]] to the [[ElementGeometryDataEntry]] array.
|
|
311
311
|
* @beta
|
|
312
312
|
*/
|
|
313
|
-
appendTextBlock(block: TextBlockGeometryProps): boolean;
|
|
313
|
+
appendTextBlock(block: TextBlockGeometryProps, geomParams?: GeometryParams): boolean;
|
|
314
314
|
/** Append a [[ImageGraphic]] supplied in either local or world coordinates to the [[ElementGeometryDataEntry]] array */
|
|
315
315
|
appendImageGraphic(image: ImageGraphic): boolean;
|
|
316
316
|
/** Append a [[BRepEntity.DataProps]] supplied in either local or world coordinates to the [[ElementGeometryDataEntry]] array.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ElementGeometry.d.ts","sourceRoot":"","sources":["../../../src/geometry/ElementGeometry.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,aAAa,EAAQ,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtE,OAAO,EAAE,KAAK,EAA+E,aAAa,EAA6E,OAAO,EAAE,OAAO,EAAiE,OAAO,EAAkB,SAAS,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAGvW,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEhF,OAAO,EAA8C,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAI/F,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAuB,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AAEtF,OAAO,EAAE,mBAAmB,EAAe,WAAW,EAAE,MAAM,aAAa,CAAC;AAC5E,OAAO,EAAsB,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAE9E;;;;GAIG;AACH,oBAAY,qBAAqB;IAC/B,0EAA0E;IAC1E,eAAe,IAAI;IACnB,iD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E,wBAAwB,EAAE,EAAE,YAAY,CAAC,EAAE,SAAS,GAAG,OAAO,CAuWvI;IAED,iEAAiE;IACjE,SAAgB,cAAc,CAAC,KAAK,EAAE,wBAAwB,EAAE,aAAa,CAAC,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CA2BjH;IAED,qEAAqE;IACrE,SAAgB,gBAAgB,CAAC,MAAM,EAAE,UAAU,EAAE,aAAa,CAAC,EAAE,SAAS,EAAE,YAAY,CAAC,EAAE,SAAS,GAAG,wBAAwB,GAAG,SAAS,CAoC9I;IAED,kGAAkG;IAClG,SAAgB,iBAAiB,CAAC,KAAK,EAAE,wBAAwB,GAAG,mBAAmB,GAAG,SAAS,CAclG;IAED,qHAAqH;IACrH,SAAgB,mBAAmB,CAAC,IAAI,EAAE,mBAAmB,GAAG,wBAAwB,GAAG,SAAS,CAqBnG;IAED,mEAAmE;IACnE,SAAgB,WAAW,CAAC,aAAa,EAAE,YAAY,GAAG,SAAS,GAAG,SAAS,CAQ9E;IAED,6FAA6F;IAC7F,SAAgB,qBAAqB,CAAC,IAAI,EAAE,YAAY,GAAG,mBAAmB,GAAG,SAAS,CAIzF;CACF"}
|
|
@@ -215,14 +215,14 @@ var ElementGeometry;
|
|
|
215
215
|
/** Append a series of entries representing a [[TextBlock]] to the [[ElementGeometryDataEntry]] array.
|
|
216
216
|
* @beta
|
|
217
217
|
*/
|
|
218
|
-
appendTextBlock(block) {
|
|
218
|
+
appendTextBlock(block, geomParams) {
|
|
219
219
|
for (const entry of block.entries) {
|
|
220
220
|
let result;
|
|
221
221
|
if (entry.text) {
|
|
222
222
|
result = this.appendTextString(new TextString_1.TextString(entry.text));
|
|
223
223
|
}
|
|
224
224
|
else if (entry.color) {
|
|
225
|
-
const params = new GeometryParams_1.GeometryParams(core_bentley_1.Id64.invalid);
|
|
225
|
+
const params = geomParams?.clone() ?? new GeometryParams_1.GeometryParams(core_bentley_1.Id64.invalid);
|
|
226
226
|
if (entry.color !== "subcategory") {
|
|
227
227
|
params.lineColor = ColorDef_1.ColorDef.fromJSON(entry.color);
|
|
228
228
|
}
|