#203 Improve pattern support#602
Conversation
| } catch { | ||
| XCTFail(error.localizedDescription) | ||
| return | ||
| print(error.localizedDescription) |
There was a problem hiding this comment.
Why XCTFail replaced with print?
There was a problem hiding this comment.
Anyway, let's separate pattern support and tests improvements.
| private let testFolderName = "MacawTestOutputData" | ||
| private let shouldComparePNGImages = true | ||
| private let multipleTestsWillRun = false | ||
| private let shouldSaveFaildedTestImage = false |
There was a problem hiding this comment.
You have removed few options in tests. For example, there is no shouldSaveFaildedTestImage which means that tests can generate some data which is not a good default value.
I would recommend to remove all these changes from this PR to keep it only about pattern support and create another one especially for tests improvements where we can discuss these changes.
| public let content: Node | ||
| public let bounds: Rect | ||
| public let userSpace: Bool | ||
| public let position: Transform |
| public let position: Transform | ||
|
|
||
| public init(content: Node, bounds: Rect, userSpace: Bool = false) { | ||
| public init(content: Node, bounds: Rect, viewBox: Rect, userSpace: Bool = false, position: Transform) { |
There was a problem hiding this comment.
You need to keep in mind that this is a breaking change, because Pattern is a part of public API. New attributes should always have default value. I'm also not quite sure that viewBox should have separate attribute, need to think about it.
|
|
||
| // Base64 image | ||
| let decodableFormat = ["image/png", "image/jpg", "image/svg+xml"] | ||
| let decodableFormat = ["image/png", "image/jpg", "image/jpeg"] |
There was a problem hiding this comment.
Do we avoid support for svg images here?
71ea0da to
c7ff33a
Compare
No description provided.