Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion src/entities/mtext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,14 @@ export interface IMtextEntity extends IEntity {
rotation: number;
attachmentPoint: number;
drawingDirection: number;
styleName: string;
backgroundFill: number;
backgroundFillColor: number;
}

export default class Mtext implements IGeometry {
public ForEntityName = 'MTEXT' as const;
public parseEntity(scanner: DxfArrayScanner, curr: IGroup) {
public parseEntity (scanner: DxfArrayScanner, curr: IGroup) {
const entity = { type: curr.value } as IMtextEntity;
curr = scanner.next();
while (!scanner.isEOF()) {
Expand Down Expand Up @@ -51,6 +54,16 @@ export default class Mtext implements IGeometry {
case 72:
entity.drawingDirection = curr.value as number;
break;
case 90:
// Background fill setting:
// 0 = Background fill off
// 1 = Use background fill color
// 2 = Use drawing window color as background fill color
entity.backgroundFill = curr.value as number;
break;
case 63:
entity.backgroundFillColor = curr.value as number;
break;
default:
helpers.checkCommonEntityProperties(entity, curr, scanner);
break;
Expand Down