Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
113 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
export enum DirectionMask { | ||
none = 0, | ||
west = 1, | ||
north = 2, | ||
south = 4, | ||
east = 8, | ||
all = 15, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
export enum FontStyle { | ||
bold = 1, | ||
italic = 2, | ||
underlined = 4, | ||
} | ||
|
||
export namespace FontStyle { | ||
export function isBold(fontStyle?: FontStyle | null) { | ||
return fontStyle != null && (fontStyle & FontStyle.bold) === FontStyle.bold | ||
} | ||
|
||
export function isItalic(fontStyle?: FontStyle | null) { | ||
return ( | ||
fontStyle != null && (fontStyle & FontStyle.italic) === FontStyle.italic | ||
) | ||
} | ||
|
||
export function isUnderlined(fontStyle?: FontStyle | null) { | ||
return ( | ||
fontStyle != null && | ||
(fontStyle & FontStyle.underlined) === FontStyle.underlined | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export * from './direction' | ||
export * from './font-style' | ||
export * from './node-type' | ||
export * from './page-size' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
export enum NodeType { | ||
element = 1, | ||
attribute = 2, | ||
text = 3, | ||
cdata = 4, | ||
entityReference = 5, | ||
entity = 6, | ||
processingInstruction = 7, | ||
comment = 8, | ||
document = 9, | ||
documentType = 10, | ||
documentFragment = 11, | ||
notation = 12, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
export namespace PageSize { | ||
/** | ||
* A4 (210 mm x 297 mm) | ||
*/ | ||
export const A4_PORTRAIT = { width: 827, height: 1169 } | ||
export const A4_LANDSCAPE = { width: 1169, height: 827 } | ||
|
||
/** | ||
* US-Letter (8,5" x 11") | ||
*/ | ||
export const LETTER_PORTRAIT = { width: 850, height: 1100 } | ||
export const LETTER_LANDSCAPE = { width: 1100, height: 850 } | ||
|
||
/** | ||
* US-Legal (8,5" x 14") | ||
*/ | ||
export const LEGAL = { width: 850, height: 1400 } | ||
|
||
/** | ||
* US-Tabloid (279 mm x 432 mm) | ||
*/ | ||
export const TABLOID = { width: 850, height: 1400 } | ||
|
||
/** | ||
* A0 (841 mm x 1189 mm) | ||
*/ | ||
export const A0 = { width: 3300, height: 4681 } | ||
|
||
/** | ||
* A1 (594 mm x 841 mm) | ||
*/ | ||
export const A1 = { width: 2339, height: 3300 } | ||
|
||
/** | ||
* A2 (420 mm x 594 mm) | ||
*/ | ||
export const A2 = { width: 1654, height: 2336 } | ||
|
||
/** | ||
* A3 (297 mm x 420 mm) | ||
*/ | ||
export const A3 = { width: 1169, height: 1654 } | ||
|
||
/** | ||
* A4 (210 mm x 297 mm) | ||
*/ | ||
export const A4 = A4_PORTRAIT | ||
|
||
/** | ||
* A5 (148 mm x 210 mm) | ||
*/ | ||
export const A5 = { width: 583, height: 827 } | ||
|
||
/** | ||
* A6 (105 mm x 148 mm) | ||
*/ | ||
export const A6 = { width: 413, height: 583 } | ||
|
||
/** | ||
* A7 (74 mm x 105 mm) | ||
*/ | ||
export const A7 = { width: 291, height: 413 } | ||
} |