Extract render target logic out of renderer to be target agnostic

This commit is contained in:
MoyuScript
2017-08-06 20:21:35 +08:00
parent 2d23b7ef07
commit fd9cb379da
6 changed files with 652 additions and 523 deletions

View File

@ -25,13 +25,11 @@ export const TEXT_DECORATION_LINE = {
export type TextDecorationStyle = $Values<typeof TEXT_DECORATION_STYLE>;
export type TextDecorationLine = $Values<typeof TEXT_DECORATION_LINE>;
type TextDecorationLineType = Array<TextDecorationLine> | null;
export type TextDecoration =
| {
textDecorationLine: Array<TextDecorationLine>,
textDecorationStyle: TextDecorationStyle,
textDecorationColor: Color | null
}
| $Values<typeof TEXT_DECORATION>;
export type TextDecoration = {
textDecorationLine: Array<TextDecorationLine>,
textDecorationStyle: TextDecorationStyle,
textDecorationColor: Color | null
} | null;
const parseLine = (line: string): TextDecorationLine => {
switch (line) {