@itwin/core-backend 5.2.0-dev.8 → 5.3.0-dev.1
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 +31 -1
- package/lib/cjs/BackendHubAccess.d.ts +2 -0
- package/lib/cjs/BackendHubAccess.d.ts.map +1 -1
- package/lib/cjs/BackendHubAccess.js.map +1 -1
- package/lib/cjs/BackendLoggerCategory.d.ts +6 -0
- package/lib/cjs/BackendLoggerCategory.d.ts.map +1 -1
- package/lib/cjs/BackendLoggerCategory.js +6 -0
- package/lib/cjs/BackendLoggerCategory.js.map +1 -1
- package/lib/cjs/BriefcaseManager.d.ts +57 -3
- package/lib/cjs/BriefcaseManager.d.ts.map +1 -1
- package/lib/cjs/BriefcaseManager.js +151 -42
- package/lib/cjs/BriefcaseManager.js.map +1 -1
- package/lib/cjs/CloudSqlite.d.ts +4 -0
- package/lib/cjs/CloudSqlite.d.ts.map +1 -1
- package/lib/cjs/CloudSqlite.js.map +1 -1
- package/lib/cjs/ECDb.d.ts +8 -0
- package/lib/cjs/ECDb.d.ts.map +1 -1
- package/lib/cjs/ECDb.js +22 -0
- package/lib/cjs/ECDb.js.map +1 -1
- package/lib/cjs/IModelDb.d.ts +54 -3
- package/lib/cjs/IModelDb.d.ts.map +1 -1
- package/lib/cjs/IModelDb.js +87 -9
- package/lib/cjs/IModelDb.js.map +1 -1
- package/lib/cjs/IModelHost.d.ts +11 -1
- package/lib/cjs/IModelHost.d.ts.map +1 -1
- package/lib/cjs/IModelHost.js +5 -0
- package/lib/cjs/IModelHost.js.map +1 -1
- package/lib/cjs/IModelIncrementalSchemaLocater.d.ts +1 -5
- package/lib/cjs/IModelIncrementalSchemaLocater.d.ts.map +1 -1
- package/lib/cjs/IModelIncrementalSchemaLocater.js +0 -6
- package/lib/cjs/IModelIncrementalSchemaLocater.js.map +1 -1
- package/lib/cjs/SqliteChangesetReader.d.ts +8 -0
- package/lib/cjs/SqliteChangesetReader.d.ts.map +1 -1
- package/lib/cjs/SqliteChangesetReader.js +11 -0
- package/lib/cjs/SqliteChangesetReader.js.map +1 -1
- package/lib/cjs/StashManager.d.ts +175 -0
- package/lib/cjs/StashManager.d.ts.map +1 -0
- package/lib/cjs/StashManager.js +306 -0
- package/lib/cjs/StashManager.js.map +1 -0
- package/lib/cjs/TxnManager.d.ts +226 -15
- package/lib/cjs/TxnManager.d.ts.map +1 -1
- package/lib/cjs/TxnManager.js +249 -23
- package/lib/cjs/TxnManager.js.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts +10 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js +15 -6
- package/lib/cjs/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/cjs/annotations/LeaderGeometry.d.ts +3 -2
- package/lib/cjs/annotations/LeaderGeometry.d.ts.map +1 -1
- package/lib/cjs/annotations/LeaderGeometry.js +5 -4
- package/lib/cjs/annotations/LeaderGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.d.ts +52 -24
- package/lib/cjs/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/cjs/annotations/TextAnnotationElement.js +49 -59
- package/lib/cjs/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/cjs/annotations/TextAnnotationGeometry.d.ts +2 -0
- package/lib/cjs/annotations/TextAnnotationGeometry.d.ts.map +1 -1
- package/lib/cjs/annotations/TextAnnotationGeometry.js +26 -19
- package/lib/cjs/annotations/TextAnnotationGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextBlockGeometry.d.ts.map +1 -1
- package/lib/cjs/annotations/TextBlockGeometry.js +8 -0
- package/lib/cjs/annotations/TextBlockGeometry.js.map +1 -1
- package/lib/cjs/annotations/TextBlockLayout.d.ts +49 -36
- package/lib/cjs/annotations/TextBlockLayout.d.ts.map +1 -1
- package/lib/cjs/annotations/TextBlockLayout.js +204 -135
- package/lib/cjs/annotations/TextBlockLayout.js.map +1 -1
- package/lib/cjs/internal/ChannelAdmin.js +1 -1
- package/lib/cjs/internal/ChannelAdmin.js.map +1 -1
- package/lib/cjs/internal/Symbols.d.ts +1 -0
- package/lib/cjs/internal/Symbols.d.ts.map +1 -1
- package/lib/cjs/internal/Symbols.js +2 -1
- package/lib/cjs/internal/Symbols.js.map +1 -1
- package/lib/cjs/internal/annotations/fields.d.ts +2 -12
- package/lib/cjs/internal/annotations/fields.d.ts.map +1 -1
- package/lib/cjs/internal/annotations/fields.js +49 -45
- package/lib/cjs/internal/annotations/fields.js.map +1 -1
- package/lib/cjs/workspace/Workspace.d.ts +1 -1
- package/lib/cjs/workspace/Workspace.js.map +1 -1
- package/lib/esm/BackendHubAccess.d.ts +2 -0
- package/lib/esm/BackendHubAccess.d.ts.map +1 -1
- package/lib/esm/BackendHubAccess.js.map +1 -1
- package/lib/esm/BackendLoggerCategory.d.ts +6 -0
- package/lib/esm/BackendLoggerCategory.d.ts.map +1 -1
- package/lib/esm/BackendLoggerCategory.js +6 -0
- package/lib/esm/BackendLoggerCategory.js.map +1 -1
- package/lib/esm/BriefcaseManager.d.ts +57 -3
- package/lib/esm/BriefcaseManager.d.ts.map +1 -1
- package/lib/esm/BriefcaseManager.js +152 -43
- package/lib/esm/BriefcaseManager.js.map +1 -1
- package/lib/esm/CloudSqlite.d.ts +4 -0
- package/lib/esm/CloudSqlite.d.ts.map +1 -1
- package/lib/esm/CloudSqlite.js.map +1 -1
- package/lib/esm/ECDb.d.ts +8 -0
- package/lib/esm/ECDb.d.ts.map +1 -1
- package/lib/esm/ECDb.js +22 -0
- package/lib/esm/ECDb.js.map +1 -1
- package/lib/esm/IModelDb.d.ts +54 -3
- package/lib/esm/IModelDb.d.ts.map +1 -1
- package/lib/esm/IModelDb.js +88 -10
- package/lib/esm/IModelDb.js.map +1 -1
- package/lib/esm/IModelHost.d.ts +11 -1
- package/lib/esm/IModelHost.d.ts.map +1 -1
- package/lib/esm/IModelHost.js +5 -0
- package/lib/esm/IModelHost.js.map +1 -1
- package/lib/esm/IModelIncrementalSchemaLocater.d.ts +1 -5
- package/lib/esm/IModelIncrementalSchemaLocater.d.ts.map +1 -1
- package/lib/esm/IModelIncrementalSchemaLocater.js +0 -6
- package/lib/esm/IModelIncrementalSchemaLocater.js.map +1 -1
- package/lib/esm/SqliteChangesetReader.d.ts +8 -0
- package/lib/esm/SqliteChangesetReader.d.ts.map +1 -1
- package/lib/esm/SqliteChangesetReader.js +11 -0
- package/lib/esm/SqliteChangesetReader.js.map +1 -1
- package/lib/esm/StashManager.d.ts +175 -0
- package/lib/esm/StashManager.d.ts.map +1 -0
- package/lib/esm/StashManager.js +301 -0
- package/lib/esm/StashManager.js.map +1 -0
- package/lib/esm/TxnManager.d.ts +226 -15
- package/lib/esm/TxnManager.d.ts.map +1 -1
- package/lib/esm/TxnManager.js +247 -21
- package/lib/esm/TxnManager.js.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts +10 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.d.ts.map +1 -1
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js +13 -5
- package/lib/esm/annotations/ElementDrivesTextAnnotation.js.map +1 -1
- package/lib/esm/annotations/LeaderGeometry.d.ts +3 -2
- package/lib/esm/annotations/LeaderGeometry.d.ts.map +1 -1
- package/lib/esm/annotations/LeaderGeometry.js +5 -4
- package/lib/esm/annotations/LeaderGeometry.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.d.ts +52 -24
- package/lib/esm/annotations/TextAnnotationElement.d.ts.map +1 -1
- package/lib/esm/annotations/TextAnnotationElement.js +51 -61
- package/lib/esm/annotations/TextAnnotationElement.js.map +1 -1
- package/lib/esm/annotations/TextAnnotationGeometry.d.ts +2 -0
- package/lib/esm/annotations/TextAnnotationGeometry.d.ts.map +1 -1
- package/lib/esm/annotations/TextAnnotationGeometry.js +26 -19
- package/lib/esm/annotations/TextAnnotationGeometry.js.map +1 -1
- package/lib/esm/annotations/TextBlockGeometry.d.ts.map +1 -1
- package/lib/esm/annotations/TextBlockGeometry.js +8 -0
- package/lib/esm/annotations/TextBlockGeometry.js.map +1 -1
- package/lib/esm/annotations/TextBlockLayout.d.ts +49 -36
- package/lib/esm/annotations/TextBlockLayout.d.ts.map +1 -1
- package/lib/esm/annotations/TextBlockLayout.js +205 -136
- package/lib/esm/annotations/TextBlockLayout.js.map +1 -1
- package/lib/esm/internal/ChannelAdmin.js +1 -1
- package/lib/esm/internal/ChannelAdmin.js.map +1 -1
- package/lib/esm/internal/Symbols.d.ts +1 -0
- package/lib/esm/internal/Symbols.d.ts.map +1 -1
- package/lib/esm/internal/Symbols.js +1 -0
- package/lib/esm/internal/Symbols.js.map +1 -1
- package/lib/esm/internal/annotations/fields.d.ts +2 -12
- package/lib/esm/internal/annotations/fields.d.ts.map +1 -1
- package/lib/esm/internal/annotations/fields.js +51 -47
- package/lib/esm/internal/annotations/fields.js.map +1 -1
- package/lib/esm/test/AnnotationTestUtils.d.ts +5 -1
- package/lib/esm/test/AnnotationTestUtils.d.ts.map +1 -1
- package/lib/esm/test/AnnotationTestUtils.js +6 -1
- package/lib/esm/test/AnnotationTestUtils.js.map +1 -1
- package/lib/esm/test/annotations/Fields.test.js +163 -46
- package/lib/esm/test/annotations/Fields.test.js.map +1 -1
- package/lib/esm/test/annotations/LeaderGeometry.test.js +12 -10
- package/lib/esm/test/annotations/LeaderGeometry.test.js.map +1 -1
- package/lib/esm/test/annotations/TextAnnotation.test.js +299 -43
- package/lib/esm/test/annotations/TextAnnotation.test.js.map +1 -1
- package/lib/esm/test/annotations/TextBlock.test.js +453 -86
- package/lib/esm/test/annotations/TextBlock.test.js.map +1 -1
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts +46 -0
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.d.ts.map +1 -1
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js +20 -2
- package/lib/esm/test/assets/IncrementalSchemaLocater/configs/simple.config.js.map +1 -1
- package/lib/esm/test/ecdb/ECDb.test.js +71 -1
- package/lib/esm/test/ecdb/ECDb.test.js.map +1 -1
- package/lib/esm/test/hubaccess/Rebase.test.d.ts +2 -0
- package/lib/esm/test/hubaccess/Rebase.test.d.ts.map +1 -0
- package/lib/esm/test/hubaccess/Rebase.test.js +640 -0
- package/lib/esm/test/hubaccess/Rebase.test.js.map +1 -0
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js +20 -20
- package/lib/esm/test/incrementalSchemaLocater/ECSqlQueries.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js +3 -3
- package/lib/esm/test/incrementalSchemaLocater/IncrementalLoading.test.js.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts +16 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.d.ts.map +1 -1
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js +47 -0
- package/lib/esm/test/incrementalSchemaLocater/utils/TestSqlSchemaLocater.js.map +1 -1
- package/lib/esm/test/standalone/ChangeMerge.test.js +15 -19
- package/lib/esm/test/standalone/ChangeMerge.test.js.map +1 -1
- package/lib/esm/test/standalone/ChangesetReader.test.js +131 -1
- package/lib/esm/test/standalone/ChangesetReader.test.js.map +1 -1
- package/lib/esm/test/standalone/MergeConflict.test.js +3 -3
- package/lib/esm/test/standalone/MergeConflict.test.js.map +1 -1
- package/lib/esm/workspace/Workspace.d.ts +1 -1
- package/lib/esm/workspace/Workspace.js.map +1 -1
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextAnnotationGeometry.js","sourceRoot":"","sources":["../../../src/annotations/TextAnnotationGeometry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAoCH,oEA8BC;AAhED,oDAAoJ;AAEp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,CAAC,UAAU,CAAC,CAAC;YACjD,MAAM,GAAG,MAAM,IAAI,OAAO,CAAC,mBAAmB,CAAC,4BAAY,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;QAClF,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,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 ElementGeometry\n */\n\nimport { ColorDef, ElementGeometry, FillDisplay, GeometryParams, TextAnnotation, TextAnnotationProps, TextStyleSettings } from \"@itwin/core-common\";\nimport { TextBlockLayout, TextStyleResolver } from \"./TextBlockLayout\";\nimport { LineString3d, PointString3d, Range2d, Transform } from \"@itwin/core-geometry\";\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { produceTextBlockGeometry } from \"./TextBlockGeometry\";\nimport { appendFrameToBuilder, computeIntervalPoints } from \"./FrameGeometry\";\nimport { appendLeadersToBuilder } from \"./LeaderGeometry\";\n\n/**\n * Properties required to compute the geometry of a text annotation.\n * @beta\n * @see [[appendTextAnnotationGeometry]] to append the geometry to an [[ElementGeometry.Builder]].\n */\nexport interface AppendTextAnnotationGeometryArgs {\n /** The annotation to be drawn. Be sure to include a TextBlock with runs or no geometry will be produced. */\n annotationProps: TextAnnotationProps;\n /** Layout provided by calling [[layoutTextBlock]] */\n layout: TextBlockLayout;\n /** [[TextStyleResolver]] used to get styling and scale information for creating geometry. */\n textStyleResolver: TextStyleResolver;\n /** Builder that will be added to in place */\n builder: ElementGeometry.Builder;\n /** The category the element will belong to. This will passed into the [[GeometryParams]] */\n categoryId: Id64String\n /** The optional sub-category the element will belong to. This will passed into the [[GeometryParams]] */\n subCategoryId?: Id64String\n /** Whether or not to draw geometry for things like the snap points, range, and anchor point */\n wantDebugGeometry?: boolean;\n}\n\n/** Constructs the TextBlockGeometry and frame geometry and appends the geometry to the provided builder.\n * @returns true if the geometry was successfully appended.\n * @beta\n */\nexport function appendTextAnnotationGeometry(props: AppendTextAnnotationGeometryArgs): boolean {\n const annotation = TextAnnotation.fromJSON(props.annotationProps);\n\n const transform = annotation.computeTransform(props.layout.range, props.textStyleResolver.scaleFactor);\n\n let result = true;\n\n // Construct the TextBlockGeometry\n const params = new GeometryParams(props.categoryId, props.subCategoryId);\n const entries = produceTextBlockGeometry(props.layout, transform.clone());\n result = result && props.builder.appendTextBlock(entries, params);\n\n // Construct the frame geometry\n if (props.textStyleResolver.blockSettings.frame.shape !== \"none\") {\n result = result && appendFrameToBuilder(props.builder, props.textStyleResolver.blockSettings.frame, props.layout.range, transform.clone(), params);\n }\n\n // Construct the leader geometry\n if (annotation.leaders && annotation.leaders.length > 0) {\n result = result && appendLeadersToBuilder(props.builder, annotation.leaders, props.layout, transform.clone(), params, props.textStyleResolver);\n }\n\n // Construct the debug geometry\n if (props.wantDebugGeometry) {\n result = result && debugAnchorPoint(props.builder, annotation, props.layout, transform.clone());\n result = result && debugRunLayout(props.builder, props.layout, transform.clone());\n if (props.textStyleResolver.blockSettings.frame.shape !== \"none\") result = result && debugSnapPoints(props.builder, props.textStyleResolver.blockSettings, props.layout.range, transform.clone());\n }\n\n return result;\n};\n\n/**\n * Draws the anchor point and margins of the text annotation.\n * The anchor point is the point around which the text rotates and is drawn as a blue x (1m by 1m).\n * The margins are drawn as a blue box.\n * The text range is drawn as a red box.\n */\nfunction debugAnchorPoint(builder: ElementGeometry.Builder, annotation: TextAnnotation, layout: TextBlockLayout, transform: Transform): boolean {\n const range = Range2d.fromJSON(layout.range);\n const debugAnchorPt = transform.multiplyPoint3d(annotation.computeAnchorPoint(range));\n\n // Make it blue\n const blueLineParams = new GeometryParams(Id64.invalid);\n blueLineParams.lineColor = ColorDef.blue;\n let result = builder.appendGeometryParamsChange(blueLineParams);\n\n // Draw a blue box to show the element's margin\n const marginCorners = range.corners3d(true);\n transform.multiplyPoint3dArrayInPlace(marginCorners);\n result = result && builder.appendGeometryQuery(LineString3d.create(marginCorners));\n\n // Draw a blue x to show the anchor point - Rotation occurs around this point. The x will be 1 m by 1 m.\n result = result && builder.appendGeometryQuery(LineString3d.create(debugAnchorPt.plusXYZ(-1, -1), debugAnchorPt.plusXYZ(1, 1)));\n result = result && builder.appendGeometryQuery(LineString3d.create(debugAnchorPt.plusXYZ(1, -1), debugAnchorPt.plusXYZ(-1, 1)));\n\n // Draw a red box to show the text range\n const redLineParams = new GeometryParams(Id64.invalid);\n redLineParams.lineColor = ColorDef.red;\n result = result && builder.appendGeometryParamsChange(redLineParams);\n\n const rangeCorners = layout.textRange.corners3d(true);\n transform.multiplyPoint3dArrayInPlace(rangeCorners);\n result = result && builder.appendGeometryQuery(LineString3d.create(rangeCorners));\n\n return result;\n}\n\n/** Draws the interval points defined by calling [[computeIntervalPoints]]. The points are shown as black dots 5x larger than the borderWeight */\nfunction debugSnapPoints(builder: ElementGeometry.Builder, style: TextStyleSettings, range: Range2d, transform: Transform): boolean {\n if (style.frame.shape === \"none\")\n return false;\n const points = computeIntervalPoints({ frame: style.frame.shape, range, transform, lineIntervalFactor: 0.5, arcIntervalFactor: 0.25 });\n\n const params = new GeometryParams(Id64.invalid);\n params.lineColor = ColorDef.black;\n params.weight = style.frame.borderWeight * 5; // We want the dots to be bigger than the frame so we can see them.\n params.fillDisplay = FillDisplay.Always;\n\n const result = builder.appendGeometryParamsChange(params) && builder.appendGeometryQuery(PointString3d.create(points));\n return result;\n}\n\n/**\n * Draws debug geometry for each line and run in a TextBlockLayout.\n *\n * For each line and run, this function draws boxes to visualize their layout and boundaries.\n * Different run types (e.g., text, linebreak, fraction, tab) are assigned distinct colors for clarity.\n * This is useful for debugging text layout and alignment issues.\n *\n * @param builder - The geometry builder to append debug geometry to.\n * @param layout - The text block layout containing lines and runs to visualize.\n * @param documentTransform - The transform to apply to the entire document.\n * @returns True if all debug geometry was successfully appended.\n */\nfunction debugRunLayout(builder: ElementGeometry.Builder, layout: TextBlockLayout, documentTransform: Transform): boolean {\n let result = true; // Tracks if all geometry was appended successfully\n let color = ColorDef.black; // Current color for the run type\n let lastColor = color; // Last color used, to minimize param changes\n\n // Map run types to debug colors\n const colors = {\n \"text\": ColorDef.fromString(\"orange\"),\n \"linebreak\": ColorDef.fromString(\"yellow\"),\n \"fraction\": ColorDef.fromString(\"green\"),\n \"tab\": ColorDef.fromString(\"aquamarine\"),\n \"field\": ColorDef.fromString(\"purple\"),\n }\n\n layout.lines.forEach(line => {\n // Apply the line's offset transform\n const lineTrans = Transform.createTranslationXYZ(line.offsetFromDocument.x, line.offsetFromDocument.y, 0);\n documentTransform.multiplyTransformTransform(lineTrans, lineTrans);\n\n line.runs.forEach(run => {\n // Determine color for this run type\n color = colors[run.source.type] ?? ColorDef.black;\n\n // Only change geometry params if the color changes\n if (!lastColor.equals(color)) {\n const colorParams = new GeometryParams(Id64.invalid);\n colorParams.lineColor = color;\n result = result && builder.appendGeometryParamsChange(colorParams);\n lastColor = color;\n }\n\n // Apply the line's offset to the run's offset\n const runTrans = Transform.createTranslationXYZ(run.offsetFromLine.x, run.offsetFromLine.y, 0);\n lineTrans.multiplyTransformTransform(runTrans, runTrans);\n\n // Draw the enclosing range for the run\n const runCorners = run.range.corners3d(true);\n runTrans.multiplyPoint3dArrayInPlace(runCorners);\n result = result && builder.appendGeometryQuery(LineString3d.create(runCorners));\n });\n });\n\n return result;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TextAnnotationGeometry.js","sourceRoot":"","sources":["../../../src/annotations/TextAnnotationGeometry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AAsCH,oEA8BC;AAlED,oDAAoJ;AAEpJ,wDAAuF;AACvF,sDAAuD;AACvD,2DAA+D;AAC/D,mDAA8E;AAC9E,qDAA0D;AA0B1D;;;GAGG;AACH,SAAgB,4BAA4B,CAAC,KAAuC;IAClF,MAAM,UAAU,GAAG,4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S,CAAC,CAAC;QAEnE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;YAChB,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC;QACjD,CAAC;QAED,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YACtB,oCAAoC;YACpC,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,sBAAQ,CAAC,KAAK,CAAC;YACxD,OAAO,CAAC,GAAG,EAAE,SAAS,EAAE,KAAK,CAAC,CAAC;QACjC,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,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 ElementGeometry\n */\n\nimport { ColorDef, ElementGeometry, FillDisplay, GeometryParams, TextAnnotation, TextAnnotationProps, TextStyleSettings } from \"@itwin/core-common\";\nimport { RunLayout, TextBlockLayout, TextStyleResolver } from \"./TextBlockLayout\";\nimport { LineString3d, PointString3d, Range2d, Transform } from \"@itwin/core-geometry\";\nimport { Id64, Id64String } from \"@itwin/core-bentley\";\nimport { produceTextBlockGeometry } from \"./TextBlockGeometry\";\nimport { appendFrameToBuilder, computeIntervalPoints } from \"./FrameGeometry\";\nimport { appendLeadersToBuilder } from \"./LeaderGeometry\";\n\n/**\n * Properties required to compute the geometry of a text annotation.\n * @beta\n * @see [[appendTextAnnotationGeometry]] to append the geometry to an [[ElementGeometry.Builder]].\n */\nexport interface AppendTextAnnotationGeometryArgs {\n /** The annotation to be drawn. Be sure to include a TextBlock with runs or no geometry will be produced. */\n annotationProps: TextAnnotationProps;\n /** Layout provided by calling [[layoutTextBlock]] */\n layout: TextBlockLayout;\n /** [[TextStyleResolver]] used to get styling and scale information for creating geometry. */\n textStyleResolver: TextStyleResolver;\n /** The scale factor to apply to the annotation. Usually comes from the `scaleFactor` of a [[Drawing]] element. */\n scaleFactor: number;\n /** Builder that will be added to in place */\n builder: ElementGeometry.Builder;\n /** The category the element will belong to. This will passed into the [[GeometryParams]] */\n categoryId: Id64String\n /** The optional sub-category the element will belong to. This will passed into the [[GeometryParams]] */\n subCategoryId?: Id64String\n /** Whether or not to draw geometry for things like the snap points, range, and anchor point */\n wantDebugGeometry?: boolean;\n}\n\n/** Constructs the TextBlockGeometry and frame geometry and appends the geometry to the provided builder.\n * @returns true if the geometry was successfully appended.\n * @beta\n */\nexport function appendTextAnnotationGeometry(props: AppendTextAnnotationGeometryArgs): boolean {\n const annotation = TextAnnotation.fromJSON(props.annotationProps);\n\n const transform = annotation.computeTransform(props.layout.range, props.scaleFactor);\n\n let result = true;\n\n // Construct the TextBlockGeometry\n const params = new GeometryParams(props.categoryId, props.subCategoryId);\n const entries = produceTextBlockGeometry(props.layout, transform.clone());\n result = result && props.builder.appendTextBlock(entries, params);\n\n // Construct the frame geometry\n if (props.textStyleResolver.blockSettings.frame.shape !== \"none\") {\n result = result && appendFrameToBuilder(props.builder, props.textStyleResolver.blockSettings.frame, props.layout.range, transform.clone(), params);\n }\n\n // Construct the leader geometry\n if (annotation.leaders && annotation.leaders.length > 0) {\n result = result && appendLeadersToBuilder(props.builder, annotation.leaders, props.layout, transform.clone(), params, props.textStyleResolver, props.scaleFactor);\n }\n\n // Construct the debug geometry\n if (props.wantDebugGeometry) {\n result = result && debugAnchorPoint(props.builder, annotation, props.layout, transform.clone());\n result = result && debugRunLayout(props.builder, props.layout, transform.clone());\n if (props.textStyleResolver.blockSettings.frame.shape !== \"none\") result = result && debugSnapPoints(props.builder, props.textStyleResolver.blockSettings, props.layout.range, transform.clone());\n }\n\n return result;\n};\n\n/**\n * Draws the anchor point and margins of the text annotation.\n * The anchor point is the point around which the text rotates and is drawn as a blue x (1m by 1m).\n * The margins are drawn as a blue box.\n * The text range is drawn as a red box.\n */\nfunction debugAnchorPoint(builder: ElementGeometry.Builder, annotation: TextAnnotation, layout: TextBlockLayout, transform: Transform): boolean {\n const range = Range2d.fromJSON(layout.range);\n const debugAnchorPt = transform.multiplyPoint3d(annotation.computeAnchorPoint(range));\n\n // Make it blue\n const blueLineParams = new GeometryParams(Id64.invalid);\n blueLineParams.lineColor = ColorDef.blue;\n let result = builder.appendGeometryParamsChange(blueLineParams);\n\n // Draw a blue box to show the element's margin\n const marginCorners = range.corners3d(true);\n transform.multiplyPoint3dArrayInPlace(marginCorners);\n result = result && builder.appendGeometryQuery(LineString3d.create(marginCorners));\n\n // Draw a blue x to show the anchor point - Rotation occurs around this point. The x will be 1 m by 1 m.\n result = result && builder.appendGeometryQuery(LineString3d.create(debugAnchorPt.plusXYZ(-1, -1), debugAnchorPt.plusXYZ(1, 1)));\n result = result && builder.appendGeometryQuery(LineString3d.create(debugAnchorPt.plusXYZ(1, -1), debugAnchorPt.plusXYZ(-1, 1)));\n\n // Draw a red box to show the text range\n const redLineParams = new GeometryParams(Id64.invalid);\n redLineParams.lineColor = ColorDef.red;\n result = result && builder.appendGeometryParamsChange(redLineParams);\n\n const rangeCorners = layout.textRange.corners3d(true);\n transform.multiplyPoint3dArrayInPlace(rangeCorners);\n result = result && builder.appendGeometryQuery(LineString3d.create(rangeCorners));\n\n return result;\n}\n\n/** Draws the interval points defined by calling [[computeIntervalPoints]]. The points are shown as black dots 5x larger than the borderWeight */\nfunction debugSnapPoints(builder: ElementGeometry.Builder, style: TextStyleSettings, range: Range2d, transform: Transform): boolean {\n if (style.frame.shape === \"none\")\n return false;\n const points = computeIntervalPoints({ frame: style.frame.shape, range, transform, lineIntervalFactor: 0.5, arcIntervalFactor: 0.25 });\n\n const params = new GeometryParams(Id64.invalid);\n params.lineColor = ColorDef.black;\n params.weight = style.frame.borderWeight * 5; // We want the dots to be bigger than the frame so we can see them.\n params.fillDisplay = FillDisplay.Always;\n\n const result = builder.appendGeometryParamsChange(params) && builder.appendGeometryQuery(PointString3d.create(points));\n return result;\n}\n\n/**\n * Draws debug geometry for each line and run in a TextBlockLayout.\n *\n * For each line and run, this function draws boxes to visualize their layout and boundaries.\n * Different run types (e.g., text, linebreak, fraction, tab) are assigned distinct colors for clarity.\n * This is useful for debugging text layout and alignment issues.\n *\n * @param builder - The geometry builder to append debug geometry to.\n * @param layout - The text block layout containing lines and runs to visualize.\n * @param documentTransform - The transform to apply to the entire document.\n * @returns True if all debug geometry was successfully appended.\n */\nfunction debugRunLayout(builder: ElementGeometry.Builder, layout: TextBlockLayout, documentTransform: Transform): boolean {\n let result = true; // Tracks if all geometry was appended successfully\n let lastColor = ColorDef.black; // Last color used, to minimize param changes\n\n // Map run types to debug colors\n const colors = {\n \"text\": ColorDef.fromString(\"orange\"),\n \"linebreak\": ColorDef.fromString(\"yellow\"),\n \"fraction\": ColorDef.fromString(\"green\"),\n \"tab\": ColorDef.fromString(\"aquamarine\"),\n \"field\": ColorDef.fromString(\"purple\"),\n \"marker\": ColorDef.fromString(\"pink\"),\n }\n\n const drawBox = (run: RunLayout, lineTransform: Transform, newColor: ColorDef) => {\n // Only change geometry params if the color changes\n if (lastColor !== newColor) {\n const colorParams = new GeometryParams(Id64.invalid);\n colorParams.lineColor = newColor;\n colorParams.weight = run.source.type === \"linebreak\" ? 3 : undefined;\n result = result && builder.appendGeometryParamsChange(colorParams);\n lastColor = newColor;\n }\n\n // Apply the line's offset to the run's offset\n const runTrans = Transform.createTranslationXYZ(run.offsetFromLine.x, run.offsetFromLine.y, 0);\n lineTransform.multiplyTransformTransform(runTrans, runTrans);\n\n // Draw the enclosing range for the run\n const runCorners = run.range.corners3d(true);\n runTrans.multiplyPoint3dArrayInPlace(runCorners);\n result = result && builder.appendGeometryQuery(LineString3d.create(runCorners));\n }\n\n layout.lines.forEach(line => {\n // Apply the line's offset transform\n const lineTrans = Transform.createTranslationXYZ(line.offsetFromDocument.x, line.offsetFromDocument.y, 0);\n documentTransform.multiplyTransformTransform(lineTrans, lineTrans);\n\n if (line.marker) {\n drawBox(line.marker, lineTrans, colors.marker);\n }\n\n line.runs.forEach(run => {\n // Determine color for this run type\n const color = colors[run.source.type] ?? ColorDef.black;\n drawBox(run, lineTrans, color);\n });\n });\n\n return result;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBlockGeometry.d.ts","sourceRoot":"","sources":["../../../src/annotations/TextBlockGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAA2D,MAAM,oBAAoB,CAAC;AACrH,OAAO,EAAa,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAmC,SAAS,EAAY,MAAM,sBAAsB,CAAC;AAkI5F;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,SAAS,GAAG,sBAAsB,
|
|
1
|
+
{"version":3,"file":"TextBlockGeometry.d.ts","sourceRoot":"","sources":["../../../src/annotations/TextBlockGeometry.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAA2D,MAAM,oBAAoB,CAAC;AACrH,OAAO,EAAa,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAmC,SAAS,EAAY,MAAM,sBAAsB,CAAC;AAkI5F;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,SAAS,GAAG,sBAAsB,CAmCtH"}
|
|
@@ -118,6 +118,14 @@ function produceTextBlockGeometry(layout, documentTransform) {
|
|
|
118
118
|
const context = { entries: [] };
|
|
119
119
|
for (const line of layout.lines) {
|
|
120
120
|
const lineTrans = core_geometry_1.Transform.createTranslationXYZ(line.offsetFromDocument.x, line.offsetFromDocument.y, 0);
|
|
121
|
+
// Create geometry for list markers if present
|
|
122
|
+
if (line.marker) {
|
|
123
|
+
const markerTrans = core_geometry_1.Transform.createTranslationXYZ(line.marker.offsetFromLine.x, line.marker.offsetFromLine.y, 0);
|
|
124
|
+
lineTrans.multiplyTransformTransform(markerTrans, markerTrans);
|
|
125
|
+
documentTransform.multiplyTransformTransform(markerTrans, markerTrans);
|
|
126
|
+
processTextRun(line.marker, markerTrans, context);
|
|
127
|
+
}
|
|
128
|
+
// Create geometry for runs
|
|
121
129
|
for (const run of line.runs) {
|
|
122
130
|
// Skip runs that are solely whitespace
|
|
123
131
|
if (run.source.isWhitespace) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBlockGeometry.js","sourceRoot":"","sources":["../../../src/annotations/TextBlockGeometry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AA8IH,4DAwBC;AApKD,oDAAqH;AAErH,wDAA4F;AAC5F,sDAA6C;AAO7C,SAAS,QAAQ,CAAC,KAAqB,EAAE,OAAwB;IAC/D,IAAI,KAAK,KAAK,OAAO,CAAC,QAAQ,EAAE,CAAC;QAC/B,OAAO,CAAC,QAAQ,GAAG,KAAK,CAAC;QACzB,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IAClC,CAAC;AACH,CAAC;AAED,SAAS,gBAAgB,CAAC,IAAY,EAAE,GAAc,EAAE,MAAgB;IACtE,IAAA,qBAAM,EAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAExB,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,GAAG,CAAC,KAAK,CAAC;IAE9E,OAAO,IAAI,wBAAU,CAAC;QACpB,IAAI;QACJ,IAAI,EAAE,GAAG,CAAC,MAAM;QAChB,MAAM,EAAE,UAAU;QAClB,WAAW;QACX,IAAI,EAAE,MAAM;QACZ,MAAM,EAAE,QAAQ;QAChB,SAAS,EAAE,YAAY;QACvB,MAAM;KACP,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AAE,QAAQ,EAAE,OAAO,CAAC,CAAC;YAC1C,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC;AACtC,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 ElementGeometry\n */\n\nimport { TextBlockGeometryProps, TextBlockGeometryPropsEntry, TextString, TextStyleColor } from \"@itwin/core-common\";\nimport { RunLayout, TextBlockLayout } from \"./TextBlockLayout\";\nimport { LineSegment3d, Point3d, Range2d, Transform, Vector2d } from \"@itwin/core-geometry\";\nimport { assert } from \"@itwin/core-bentley\";\n\ninterface GeometryContext {\n curColor?: TextStyleColor;\n entries: TextBlockGeometryPropsEntry[];\n}\n\nfunction setColor(color: TextStyleColor, context: GeometryContext): void {\n if (color !== context.curColor) {\n context.curColor = color;\n context.entries.push({ color });\n }\n}\n\nfunction createTextString(text: string, run: RunLayout, origin?: Point3d): TextString {\n assert(text.length > 0);\n\n const { lineHeight, widthFactor, isBold, isItalic, isUnderlined } = run.style;\n\n return new TextString({\n text,\n font: run.fontId,\n height: lineHeight,\n widthFactor,\n bold: isBold,\n italic: isItalic,\n underline: isUnderlined,\n origin,\n });\n}\n\nfunction processTextRun(run: RunLayout, transform: Transform, context: GeometryContext): void {\n assert(run.source.type === \"text\");\n const text = run.source.content.substring(run.charOffset, run.charOffset + run.numChars);\n if (text.length === 0) {\n return;\n }\n\n const ts = createTextString(text, run);\n if (\"none\" !== run.source.baselineShift) {\n const isSub = \"subscript\" === run.source.baselineShift;\n const offsetFactor = run.style[isSub ? \"subScriptOffsetFactor\" : \"superScriptOffsetFactor\"];\n const scale = run.style[isSub ? \"subScriptScale\" : \"superScriptScale\"];\n\n ts.origin.y += offsetFactor * ts.height;\n ts.height *= scale;\n }\n\n ts.transformInPlace(transform);\n\n setColor(run.style.color, context);\n context.entries.push({ text: ts });\n}\n\nfunction processFieldRun(run: RunLayout, transform: Transform, context: GeometryContext): void {\n assert(run.source.type === \"field\");\n const text = run.source.cachedContent.substring(run.charOffset, run.charOffset + run.numChars);\n if (text.length === 0) {\n return;\n }\n\n const ts = createTextString(text, run);\n ts.transformInPlace(transform);\n\n setColor(run.style.color, context);\n context.entries.push({ text: ts });\n}\n\nfunction createFractionTextString(text: string, run: RunLayout, origin: Point3d, transform: Transform): TextString {\n const ts = createTextString(text, run, origin);\n assert(undefined !== ts.widthFactor);\n\n ts.height *= run.style.stackedFractionScale;\n\n ts.transformInPlace(transform);\n\n return ts;\n}\n\nfunction processFractionRun(run: RunLayout, transform: Transform, context: GeometryContext): void {\n const source = run.source;\n assert(source.type === \"fraction\");\n\n if (source.numerator.length === 0 && source.denominator.length === 0) {\n return;\n }\n\n assert(undefined !== run.numeratorRange && undefined !== run.denominatorRange);\n\n const fontSize = new Vector2d(run.style.lineHeight * run.style.widthFactor, run.style.lineHeight);\n fontSize.scale(run.style.stackedFractionScale, fontSize);\n\n const numeratorOffset = new Point3d(run.numeratorRange.low.x, run.numeratorRange.low.y, 0);\n const denominatorOffset = new Point3d(run.denominatorRange.low.x, run.denominatorRange.low.y, 0);\n\n setColor(run.style.color, context);\n\n if (source.numerator.length > 0) {\n context.entries.push({ text: createFractionTextString(source.numerator, run, numeratorOffset, transform) });\n }\n\n const numeratorRange = Range2d.fromJSON(run.numeratorRange);\n const denominatorRange = Range2d.fromJSON(run.denominatorRange);\n\n let separator: LineSegment3d;\n if (run.style.stackedFractionType === \"horizontal\") {\n const fractionWidth = Math.max(numeratorRange.xLength(), denominatorRange.xLength());\n const y = 1.25 * denominatorRange.yLength();\n separator = LineSegment3d.createXYXY(0, y, fractionWidth, y);\n } else {\n const p0 = new Point3d(denominatorRange.low.x - fontSize.x / 2, denominatorRange.low.y + fontSize.y * (1 / 3), 0);\n const p1 = new Point3d(p0.x + fontSize.x, p0.y + fontSize.y * 1.5, 0);\n separator = LineSegment3d.createCapture(p0, p1);\n }\n\n separator.tryTransformInPlace(transform);\n\n context.entries.push({\n separator: {\n startPoint: separator.point0Ref.toJSON(),\n endPoint: separator.point1Ref.toJSON(),\n },\n });\n\n if (source.denominator.length > 0) {\n context.entries.push({ text: createFractionTextString(source.denominator, run, denominatorOffset, transform) });\n }\n}\n\n/**\n * Produces the geometry for a text block in a way that can be interpreted by a [[GeometryStreamBuilder]] or [[ElementBuilder.Geometry]].\n * To build the geometry for a whole [[TextAnnotation]], use [[appendTextAnnotationGeometry]] instead.\n * @param layout of the text block as computed by [[layoutTextBlock]].\n * @param documentTransform that positions the text block in world coordinates.\n * @returns TextBlockGeometryProps.\n * @beta\n */\nexport function produceTextBlockGeometry(layout: TextBlockLayout, documentTransform: Transform): TextBlockGeometryProps {\n const context: GeometryContext = { entries: [] };\n for (const line of layout.lines) {\n const lineTrans = Transform.createTranslationXYZ(line.offsetFromDocument.x, line.offsetFromDocument.y, 0);\n for (const run of line.runs) {\n // Skip runs that are solely whitespace\n if (run.source.isWhitespace) {\n continue;\n }\n\n const runTrans = Transform.createTranslationXYZ(run.offsetFromLine.x, run.offsetFromLine.y, 0);\n lineTrans.multiplyTransformTransform(runTrans, runTrans);\n documentTransform.multiplyTransformTransform(runTrans, runTrans);\n if (\"text\" === run.source.type) {\n processTextRun(run, runTrans, context);\n } else if (\"fraction\" === run.source.type) {\n processFractionRun(run, runTrans, context);\n } else {\n processFieldRun(run, runTrans, context);\n }\n }\n }\n\n return { entries: context.entries };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"TextBlockGeometry.js","sourceRoot":"","sources":["../../../src/annotations/TextBlockGeometry.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AA8IH,4DAmCC;AA/KD,oDAAqH;AAErH,wDAA4F;AAC5F,sDAA6C;AAO7C,SAAS,QAAQ,CAAC,KAAqB,EAAE,OAAwB;IAC/D,IAAI,KAAK,KAA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------------------------------\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 ElementGeometry\n */\n\nimport { TextBlockGeometryProps, TextBlockGeometryPropsEntry, TextString, TextStyleColor } from \"@itwin/core-common\";\nimport { RunLayout, TextBlockLayout } from \"./TextBlockLayout\";\nimport { LineSegment3d, Point3d, Range2d, Transform, Vector2d } from \"@itwin/core-geometry\";\nimport { assert } from \"@itwin/core-bentley\";\n\ninterface GeometryContext {\n curColor?: TextStyleColor;\n entries: TextBlockGeometryPropsEntry[];\n}\n\nfunction setColor(color: TextStyleColor, context: GeometryContext): void {\n if (color !== context.curColor) {\n context.curColor = color;\n context.entries.push({ color });\n }\n}\n\nfunction createTextString(text: string, run: RunLayout, origin?: Point3d): TextString {\n assert(text.length > 0);\n\n const { lineHeight, widthFactor, isBold, isItalic, isUnderlined } = run.style;\n\n return new TextString({\n text,\n font: run.fontId,\n height: lineHeight,\n widthFactor,\n bold: isBold,\n italic: isItalic,\n underline: isUnderlined,\n origin,\n });\n}\n\nfunction processTextRun(run: RunLayout, transform: Transform, context: GeometryContext): void {\n assert(run.source.type === \"text\");\n const text = run.source.content.substring(run.charOffset, run.charOffset + run.numChars);\n if (text.length === 0) {\n return;\n }\n\n const ts = createTextString(text, run);\n if (\"none\" !== run.source.baselineShift) {\n const isSub = \"subscript\" === run.source.baselineShift;\n const offsetFactor = run.style[isSub ? \"subScriptOffsetFactor\" : \"superScriptOffsetFactor\"];\n const scale = run.style[isSub ? \"subScriptScale\" : \"superScriptScale\"];\n\n ts.origin.y += offsetFactor * ts.height;\n ts.height *= scale;\n }\n\n ts.transformInPlace(transform);\n\n setColor(run.style.color, context);\n context.entries.push({ text: ts });\n}\n\nfunction processFieldRun(run: RunLayout, transform: Transform, context: GeometryContext): void {\n assert(run.source.type === \"field\");\n const text = run.source.cachedContent.substring(run.charOffset, run.charOffset + run.numChars);\n if (text.length === 0) {\n return;\n }\n\n const ts = createTextString(text, run);\n ts.transformInPlace(transform);\n\n setColor(run.style.color, context);\n context.entries.push({ text: ts });\n}\n\nfunction createFractionTextString(text: string, run: RunLayout, origin: Point3d, transform: Transform): TextString {\n const ts = createTextString(text, run, origin);\n assert(undefined !== ts.widthFactor);\n\n ts.height *= run.style.stackedFractionScale;\n\n ts.transformInPlace(transform);\n\n return ts;\n}\n\nfunction processFractionRun(run: RunLayout, transform: Transform, context: GeometryContext): void {\n const source = run.source;\n assert(source.type === \"fraction\");\n\n if (source.numerator.length === 0 && source.denominator.length === 0) {\n return;\n }\n\n assert(undefined !== run.numeratorRange && undefined !== run.denominatorRange);\n\n const fontSize = new Vector2d(run.style.lineHeight * run.style.widthFactor, run.style.lineHeight);\n fontSize.scale(run.style.stackedFractionScale, fontSize);\n\n const numeratorOffset = new Point3d(run.numeratorRange.low.x, run.numeratorRange.low.y, 0);\n const denominatorOffset = new Point3d(run.denominatorRange.low.x, run.denominatorRange.low.y, 0);\n\n setColor(run.style.color, context);\n\n if (source.numerator.length > 0) {\n context.entries.push({ text: createFractionTextString(source.numerator, run, numeratorOffset, transform) });\n }\n\n const numeratorRange = Range2d.fromJSON(run.numeratorRange);\n const denominatorRange = Range2d.fromJSON(run.denominatorRange);\n\n let separator: LineSegment3d;\n if (run.style.stackedFractionType === \"horizontal\") {\n const fractionWidth = Math.max(numeratorRange.xLength(), denominatorRange.xLength());\n const y = 1.25 * denominatorRange.yLength();\n separator = LineSegment3d.createXYXY(0, y, fractionWidth, y);\n } else {\n const p0 = new Point3d(denominatorRange.low.x - fontSize.x / 2, denominatorRange.low.y + fontSize.y * (1 / 3), 0);\n const p1 = new Point3d(p0.x + fontSize.x, p0.y + fontSize.y * 1.5, 0);\n separator = LineSegment3d.createCapture(p0, p1);\n }\n\n separator.tryTransformInPlace(transform);\n\n context.entries.push({\n separator: {\n startPoint: separator.point0Ref.toJSON(),\n endPoint: separator.point1Ref.toJSON(),\n },\n });\n\n if (source.denominator.length > 0) {\n context.entries.push({ text: createFractionTextString(source.denominator, run, denominatorOffset, transform) });\n }\n}\n\n/**\n * Produces the geometry for a text block in a way that can be interpreted by a [[GeometryStreamBuilder]] or [[ElementBuilder.Geometry]].\n * To build the geometry for a whole [[TextAnnotation]], use [[appendTextAnnotationGeometry]] instead.\n * @param layout of the text block as computed by [[layoutTextBlock]].\n * @param documentTransform that positions the text block in world coordinates.\n * @returns TextBlockGeometryProps.\n * @beta\n */\nexport function produceTextBlockGeometry(layout: TextBlockLayout, documentTransform: Transform): TextBlockGeometryProps {\n const context: GeometryContext = { entries: [] };\n for (const line of layout.lines) {\n const lineTrans = Transform.createTranslationXYZ(line.offsetFromDocument.x, line.offsetFromDocument.y, 0);\n\n // Create geometry for list markers if present\n if (line.marker) {\n const markerTrans = Transform.createTranslationXYZ(line.marker.offsetFromLine.x, line.marker.offsetFromLine.y, 0);\n lineTrans.multiplyTransformTransform(markerTrans, markerTrans);\n documentTransform.multiplyTransformTransform(markerTrans, markerTrans);\n\n processTextRun(line.marker, markerTrans, context);\n }\n\n // Create geometry for runs\n for (const run of line.runs) {\n // Skip runs that are solely whitespace\n if (run.source.isWhitespace) {\n continue;\n }\n\n const runTrans = Transform.createTranslationXYZ(run.offsetFromLine.x, run.offsetFromLine.y, 0);\n lineTrans.multiplyTransformTransform(runTrans, runTrans);\n documentTransform.multiplyTransformTransform(runTrans, runTrans);\n if (\"text\" === run.source.type) {\n processTextRun(run, runTrans, context);\n } else if (\"fraction\" === run.source.type) {\n processFractionRun(run, runTrans, context);\n } else {\n processFieldRun(run, runTrans, context);\n }\n }\n }\n\n return { entries: context.entries };\n}\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/** @packageDocumentation
|
|
2
2
|
* @module ElementGeometry
|
|
3
3
|
*/
|
|
4
|
-
import { BaselineShift, FieldRun, FontId, FontType, FractionRun, LineLayoutResult, Paragraph, Run, RunLayoutResult, TabRun,
|
|
5
|
-
import { Range2d } from "@itwin/core-geometry";
|
|
4
|
+
import { BaselineShift, FieldRun, FontId, FontType, FractionRun, LineLayoutResult, List, Paragraph, Run, RunLayoutResult, TabRun, TextBlock, TextBlockComponent, TextBlockLayoutResult, TextRun, TextStyleSettings, TextStyleSettingsProps } from "@itwin/core-common";
|
|
5
|
+
import { Range2d, WritableXAndY } from "@itwin/core-geometry";
|
|
6
6
|
import { IModelDb } from "../IModelDb";
|
|
7
7
|
import { Id64String } from "@itwin/core-bentley";
|
|
8
8
|
/** @internal */
|
|
@@ -34,12 +34,10 @@ export type FindFontId = (name: string, type?: FontType) => FontId;
|
|
|
34
34
|
/** @internal chiefly for tests. */
|
|
35
35
|
export type FindTextStyle = (id: Id64String) => TextStyleSettings;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Base interface for arguments supplied to [[computeLayoutTextBlockResult]] and [[computeGraphemeOffsets]].
|
|
38
38
|
* @beta
|
|
39
39
|
*/
|
|
40
|
-
export interface
|
|
41
|
-
/** The text block whose extents are to be computed. */
|
|
42
|
-
textBlock: TextBlock;
|
|
40
|
+
export interface LayoutTextArgs {
|
|
43
41
|
/** The iModel from which to obtain fonts and [[AnnotationTextStyle]]s when laying out glyphs. */
|
|
44
42
|
iModel: IModelDb;
|
|
45
43
|
/** The text style resolver used to resolve effective text styles during layout. */
|
|
@@ -49,6 +47,14 @@ export interface LayoutTextBlockArgs {
|
|
|
49
47
|
/** @internal chiefly for tests, by default uses IModelDb.fontMap. */
|
|
50
48
|
findFontId?: FindFontId;
|
|
51
49
|
}
|
|
50
|
+
/**
|
|
51
|
+
* Arguments supplied to [[computeLayoutTextBlockResult]].
|
|
52
|
+
* @beta
|
|
53
|
+
*/
|
|
54
|
+
export interface LayoutTextBlockArgs extends LayoutTextArgs {
|
|
55
|
+
/** The text block whose extents are to be computed. */
|
|
56
|
+
textBlock: TextBlock;
|
|
57
|
+
}
|
|
52
58
|
/**
|
|
53
59
|
* Lays out the contents of a TextBlock into a series of lines containing runs.
|
|
54
60
|
* Each paragraph is decomposed into a series of lines.
|
|
@@ -70,9 +76,9 @@ export declare function computeLayoutTextBlockResult(args: LayoutTextBlockArgs):
|
|
|
70
76
|
* Arguments supplied to [[computeGraphemeOffsets]].
|
|
71
77
|
* @beta
|
|
72
78
|
*/
|
|
73
|
-
export interface ComputeGraphemeOffsetsArgs extends
|
|
74
|
-
/** The
|
|
75
|
-
|
|
79
|
+
export interface ComputeGraphemeOffsetsArgs extends LayoutTextArgs {
|
|
80
|
+
/** The TextBlockComponent for which to compute grapheme offsets. */
|
|
81
|
+
source: TextBlockComponent;
|
|
76
82
|
/** The run layout result for which grapheme ranges will be computed. */
|
|
77
83
|
runLayoutResult: RunLayoutResult;
|
|
78
84
|
/** An array of starting character indexes for each grapheme. Each entry represents the index of the first character in a grapheme. */
|
|
@@ -93,34 +99,30 @@ export declare function computeGraphemeOffsets(args: ComputeGraphemeOffsetsArgs)
|
|
|
93
99
|
export interface TextStyleResolverArgs {
|
|
94
100
|
/** The text block whose styles are being resolved. */
|
|
95
101
|
textBlock: TextBlock;
|
|
102
|
+
/** The ID of the [[AnnotationTextStyle]] to apply. */
|
|
103
|
+
textStyleId: Id64String;
|
|
96
104
|
/** The iModel from which to obtain [[AnnotationTextStyle]]s when resolving styles. */
|
|
97
105
|
iModel: IModelDb;
|
|
98
|
-
/** The ID of the model containing the text block, used to compute the scale factor. */
|
|
99
|
-
modelId?: Id64String;
|
|
100
106
|
/** @internal chiefly for tests, by default looks up an [[AnnotationTextStyle]] in the iModel by ID. */
|
|
101
107
|
findTextStyle?: FindTextStyle;
|
|
102
108
|
}
|
|
103
109
|
/**
|
|
104
|
-
* Resolves the effective style of TextBlockComponents and Leaders, taking into account overrides
|
|
110
|
+
* Resolves the effective style of TextBlockComponents and Leaders, taking into account overrides of the instance and its parent(s).
|
|
105
111
|
* @beta
|
|
106
112
|
*/
|
|
107
113
|
export declare class TextStyleResolver {
|
|
108
|
-
private readonly _textStyles;
|
|
109
|
-
private readonly _findTextStyle;
|
|
110
114
|
/** The resolved style of the TextBlock. */
|
|
111
115
|
readonly blockSettings: TextStyleSettings;
|
|
112
|
-
/** The scale factor of the model containing the TextBlock. */
|
|
113
|
-
readonly scaleFactor: number;
|
|
114
116
|
constructor(args: TextStyleResolverArgs);
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
/**
|
|
118
|
+
* Resolves the effective text style settings for a given TextBlockComponent, applying block-level overrides.
|
|
119
|
+
*/
|
|
120
|
+
resolveSettings(overrides: TextStyleSettingsProps, isLeader?: boolean): TextStyleSettings;
|
|
121
|
+
resolveMarkerText(overrides: TextStyleSettingsProps, index: number): string;
|
|
122
|
+
/**
|
|
123
|
+
* Computes the indentation based on its style and nesting depth.
|
|
124
|
+
*/
|
|
125
|
+
resolveIndentation(styleOverrides: TextStyleSettingsProps, depth: number): number;
|
|
124
126
|
}
|
|
125
127
|
declare class LayoutContext {
|
|
126
128
|
readonly textStyleResolver: TextStyleResolver;
|
|
@@ -136,7 +138,7 @@ declare class LayoutContext {
|
|
|
136
138
|
numerator: Range2d;
|
|
137
139
|
denominator: Range2d;
|
|
138
140
|
};
|
|
139
|
-
computeRangeForTabRun(style: TextStyleSettings, source: TabRun,
|
|
141
|
+
computeRangeForTabRun(style: TextStyleSettings, source: TabRun, lengthFromLastTab: number): Range2d;
|
|
140
142
|
}
|
|
141
143
|
/**
|
|
142
144
|
* Represents the layout of a single run (text, fraction, or line break) within a line of text.
|
|
@@ -159,7 +161,7 @@ export declare class RunLayout {
|
|
|
159
161
|
style: TextStyleSettings;
|
|
160
162
|
fontId: FontId;
|
|
161
163
|
private constructor();
|
|
162
|
-
static create(source: Run,
|
|
164
|
+
static create(source: Run, context: LayoutContext, cumulativeOverrides: TextStyleSettingsProps): RunLayout;
|
|
163
165
|
/** Compute a string representation, primarily for debugging purposes. */
|
|
164
166
|
stringify(): string;
|
|
165
167
|
canWrap(): this is {
|
|
@@ -167,7 +169,7 @@ export declare class RunLayout {
|
|
|
167
169
|
};
|
|
168
170
|
private cloneForWrap;
|
|
169
171
|
split(context: LayoutContext): RunLayout[];
|
|
170
|
-
toResult(
|
|
172
|
+
toResult(): RunLayoutResult;
|
|
171
173
|
}
|
|
172
174
|
/**
|
|
173
175
|
* Represents the layout of a single line within a paragraph of a text block.
|
|
@@ -176,25 +178,34 @@ export declare class RunLayout {
|
|
|
176
178
|
* @beta
|
|
177
179
|
*/
|
|
178
180
|
export declare class LineLayout {
|
|
179
|
-
source: Paragraph;
|
|
181
|
+
source: List | Run | Paragraph;
|
|
180
182
|
range: Range2d;
|
|
183
|
+
runRange: Range2d;
|
|
181
184
|
justificationRange: Range2d;
|
|
182
|
-
offsetFromDocument:
|
|
183
|
-
|
|
184
|
-
y: number;
|
|
185
|
-
};
|
|
185
|
+
offsetFromDocument: WritableXAndY;
|
|
186
|
+
depth: number;
|
|
186
187
|
lengthFromLastTab: number;
|
|
187
188
|
private _runs;
|
|
188
|
-
|
|
189
|
+
private _marker?;
|
|
190
|
+
constructor(source: List | Run | Paragraph, style: TextStyleSettingsProps, context?: LayoutContext, depth?: number);
|
|
189
191
|
/** Compute a string representation, primarily for debugging purposes. */
|
|
190
192
|
stringify(): string;
|
|
193
|
+
/** Gets the array of RunLayout objects contained in this line. */
|
|
191
194
|
get runs(): ReadonlyArray<RunLayout>;
|
|
195
|
+
/** Indicates whether this line contains any runs. */
|
|
192
196
|
get isEmpty(): boolean;
|
|
197
|
+
/** Gets the last RunLayout in this line. */
|
|
193
198
|
get back(): RunLayout;
|
|
199
|
+
/**
|
|
200
|
+
* Gets or sets the marker RunLayout for this line, used for lists.
|
|
201
|
+
* A marker is the symbol or character that appears before each list item in a list, bullets, numbers, etc.
|
|
202
|
+
* */
|
|
203
|
+
get marker(): RunLayout | undefined;
|
|
204
|
+
set marker(value: RunLayout | undefined);
|
|
194
205
|
append(run: RunLayout): void;
|
|
195
206
|
/** Invoked every time a run is appended,. */
|
|
196
207
|
private computeRanges;
|
|
197
|
-
toResult(
|
|
208
|
+
toResult(): LineLayoutResult;
|
|
198
209
|
}
|
|
199
210
|
/**
|
|
200
211
|
* Describes the layout of a text block as a collection of lines containing runs.
|
|
@@ -216,8 +227,10 @@ export declare class TextBlockLayout {
|
|
|
216
227
|
stringify(): string;
|
|
217
228
|
private get _back();
|
|
218
229
|
private populateLines;
|
|
219
|
-
private
|
|
230
|
+
private populateComponent;
|
|
231
|
+
private populateRun;
|
|
220
232
|
private flushLine;
|
|
233
|
+
private justifyLines;
|
|
221
234
|
private applyMargins;
|
|
222
235
|
}
|
|
223
236
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextBlockLayout.d.ts","sourceRoot":"","sources":["../../../src/annotations/TextBlockLayout.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,
|
|
1
|
+
{"version":3,"file":"TextBlockLayout.d.ts","sourceRoot":"","sources":["../../../src/annotations/TextBlockLayout.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAiB,gBAAgB,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,eAAe,EAAgC,MAAM,EAAE,SAAS,EAAE,kBAAkB,EAAE,qBAAqB,EAAoB,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AACtU,OAAO,EAAY,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAU,UAAU,EAA2B,MAAM,qBAAqB,CAAC;AAKlF,gBAAgB;AAChB,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,OAA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