@mlightcad/mtext-renderer 0.10.2 → 0.10.4
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/dist/index.js +2780 -2586
- package/dist/index.umd.cjs +6 -6
- package/dist/mtext-renderer-worker.js +3389 -3219
- package/lib/index.d.ts +1 -0
- package/lib/renderer/mtextProcessor.d.ts +54 -0
- package/package.json +2 -2
package/lib/index.d.ts
CHANGED
|
@@ -176,6 +176,60 @@ export declare class MTextProcessor {
|
|
|
176
176
|
* @param item Input mtext inline codes
|
|
177
177
|
*/
|
|
178
178
|
processFormat(item: ChangedProperties): void;
|
|
179
|
+
/**
|
|
180
|
+
* Applies a full property snapshot from the parser to the current render context.
|
|
181
|
+
*
|
|
182
|
+
* This is used when the parser emits a restore token (`command === undefined`)
|
|
183
|
+
* after exiting a formatting group `{}`. The `changes` object in that case is
|
|
184
|
+
* not a delta for a specific command; it is the complete property state that
|
|
185
|
+
* should be active after the restore.
|
|
186
|
+
*
|
|
187
|
+
* The method updates:
|
|
188
|
+
* - font face + derived bold/italic/oblique settings
|
|
189
|
+
* - ACI/RGB color and ByLayer/ByBlock resolution
|
|
190
|
+
* - width/height/tracking factors
|
|
191
|
+
* - paragraph alignment and margins
|
|
192
|
+
* - underline/overline/strike-through flags
|
|
193
|
+
*/
|
|
194
|
+
private applyPropertyChanges;
|
|
195
|
+
/**
|
|
196
|
+
* Apply a font face change to the current render context, including
|
|
197
|
+
* derived bold/italic/oblique settings based on font type.
|
|
198
|
+
* @param fontFace The font face change data from the parser.
|
|
199
|
+
*/
|
|
200
|
+
private applyFontFaceChange;
|
|
201
|
+
/**
|
|
202
|
+
* Apply color changes for the inline color command (\c).
|
|
203
|
+
* This variant ignores null ACI and only applies explicit RGB when provided.
|
|
204
|
+
* @param changes The full change object for the current command.
|
|
205
|
+
*/
|
|
206
|
+
private applyColorCommandChanges;
|
|
207
|
+
/**
|
|
208
|
+
* Apply color changes from a full snapshot restore.
|
|
209
|
+
* This variant accepts null to switch back to ACI-based color.
|
|
210
|
+
* @param changes The full snapshot of properties to restore.
|
|
211
|
+
*/
|
|
212
|
+
private applyColorSnapshotChanges;
|
|
213
|
+
/**
|
|
214
|
+
* Apply width factor changes, resolving relative factors to absolute values.
|
|
215
|
+
* @param widthFactor Width factor change data.
|
|
216
|
+
*/
|
|
217
|
+
private applyWidthFactorChange;
|
|
218
|
+
/**
|
|
219
|
+
* Apply cap height changes, either as a relative scale or absolute font height.
|
|
220
|
+
* @param capHeight Cap height change data.
|
|
221
|
+
*/
|
|
222
|
+
private applyCapHeightChange;
|
|
223
|
+
/**
|
|
224
|
+
* Apply character tracking (spacing) changes.
|
|
225
|
+
* @param charTrackingFactor Character tracking change data.
|
|
226
|
+
*/
|
|
227
|
+
private applyCharTrackingChange;
|
|
228
|
+
/**
|
|
229
|
+
* Apply paragraph-level changes such as alignment and margins.
|
|
230
|
+
* @param paragraph Paragraph change data.
|
|
231
|
+
*/
|
|
232
|
+
private applyParagraphChange;
|
|
179
233
|
/**
|
|
180
234
|
* Reset paragraph properties to their default values from options.
|
|
181
235
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mlightcad/mtext-renderer",
|
|
3
|
-
"version": "0.10.
|
|
3
|
+
"version": "0.10.4",
|
|
4
4
|
"description": "AutoCAD MText renderer based on Three.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "MLight Lee <mlight.lee@outlook.com>",
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
"3d-text"
|
|
34
34
|
],
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@mlightcad/mtext-parser": "^1.
|
|
36
|
+
"@mlightcad/mtext-parser": "^1.4.1",
|
|
37
37
|
"@mlightcad/shx-parser": "^1.3.2",
|
|
38
38
|
"iconv-lite": "^0.7.0",
|
|
39
39
|
"idb": "^8.0.3",
|