Implement RefTestRenderer

This commit is contained in:
Niklas von Hertzen
2017-08-07 00:26:09 +08:00
parent a2895691ba
commit 93f08c7547
13 changed files with 409 additions and 84 deletions

View File

@@ -1,7 +1,7 @@
/* @flow */
'use strict';
import type {Bounds, BoundCurves, Path} from '../Bounds';
import type {Path} from '../drawing/Path';
import type {Bounds, BoundCurves} from '../Bounds';
import type ImageLoader, {ImageElement} from '../ImageLoader';
import Color from '../Color';

View File

@@ -29,7 +29,7 @@ export type TextDecoration = {
textDecorationLine: Array<TextDecorationLine>,
textDecorationStyle: TextDecorationStyle,
textDecorationColor: Color | null
} | null;
};
const parseLine = (line: string): TextDecorationLine => {
switch (line) {
@@ -65,7 +65,7 @@ const parseTextDecorationStyle = (style: string): TextDecorationStyle => {
return TEXT_DECORATION_STYLE.SOLID;
};
export const parseTextDecoration = (style: CSSStyleDeclaration): TextDecoration => {
export const parseTextDecoration = (style: CSSStyleDeclaration): TextDecoration | null => {
const textDecorationLine = parseTextDecorationLine(
style.textDecorationLine ? style.textDecorationLine : style.textDecoration
);