better
This commit is contained in:
parent
ff3e7e3316
commit
20fa9e51a0
1 changed files with 49 additions and 65 deletions
|
@ -31,86 +31,70 @@ let roundedRect = newPath()
|
||||||
roundedRect.roundedRect(10.5, 10.5, 479, 279, radius, radius, radius, radius)
|
roundedRect.roundedRect(10.5, 10.5, 479, 279, radius, radius, radius, radius)
|
||||||
# roundedRect.roundedRect(10, 10, 480, 280, radius, radius, radius, radius)
|
# roundedRect.roundedRect(10, 10, 480, 280, radius, radius, radius, radius)
|
||||||
|
|
||||||
timeIt "rect Image OverwriteBlend":
|
block:
|
||||||
|
let image = newImage(width, height)
|
||||||
|
|
||||||
|
timeIt "rect Image OverwriteBlend":
|
||||||
paint.blendMode = OverwriteBlend
|
paint.blendMode = OverwriteBlend
|
||||||
|
|
||||||
let image = newImage(width, height)
|
|
||||||
image.fillPath(rect, paint)
|
image.fillPath(rect, paint)
|
||||||
|
|
||||||
timeIt "rect Image NormalBlend":
|
timeIt "rect Image NormalBlend":
|
||||||
paint.blendMode = NormalBlend
|
paint.blendMode = NormalBlend
|
||||||
|
|
||||||
let image = newImage(width, height)
|
|
||||||
image.fillPath(rect, paint)
|
image.fillPath(rect, paint)
|
||||||
|
|
||||||
timeIt "rect Image MaskBlend":
|
timeIt "rect Image MaskBlend":
|
||||||
paint.blendMode = MaskBlend
|
paint.blendMode = MaskBlend
|
||||||
|
|
||||||
let image = newImage(width, height)
|
|
||||||
image.fill(rgbx(255, 255, 255, 255))
|
image.fill(rgbx(255, 255, 255, 255))
|
||||||
image.fillPath(rect, paint)
|
image.fillPath(rect, paint)
|
||||||
|
|
||||||
timeIt "roundedRect Image OverwriteBlend":
|
timeIt "roundedRect Image OverwriteBlend":
|
||||||
paint.blendMode = OverwriteBlend
|
paint.blendMode = OverwriteBlend
|
||||||
|
|
||||||
let image = newImage(width, height)
|
|
||||||
image.fillPath(roundedRect, paint)
|
image.fillPath(roundedRect, paint)
|
||||||
|
|
||||||
timeIt "roundedRect Image NormalBlend":
|
timeIt "roundedRect Image NormalBlend":
|
||||||
paint.blendMode = NormalBlend
|
paint.blendMode = NormalBlend
|
||||||
|
|
||||||
let image = newImage(width, height)
|
|
||||||
image.fillPath(roundedRect, paint)
|
image.fillPath(roundedRect, paint)
|
||||||
|
|
||||||
timeIt "roundedRect Image MaskBlend":
|
timeIt "roundedRect Image MaskBlend":
|
||||||
paint.blendMode = MaskBlend
|
paint.blendMode = MaskBlend
|
||||||
|
|
||||||
let image = newImage(width, height)
|
|
||||||
image.fill(rgbx(255, 255, 255, 255))
|
image.fill(rgbx(255, 255, 255, 255))
|
||||||
image.fillPath(roundedRect, paint)
|
image.fillPath(roundedRect, paint)
|
||||||
|
|
||||||
timeIt "rect Mask OverwriteBlend":
|
block:
|
||||||
let mask = newMask(width, height)
|
let mask = newMask(width, height)
|
||||||
mask.fillPath(roundedRect, blendMode = OverwriteBlend)
|
|
||||||
|
|
||||||
timeIt "rect Mask NormalBlend":
|
timeIt "rect Mask OverwriteBlend":
|
||||||
let mask = newMask(width, height)
|
mask.fillPath(rect, blendMode = OverwriteBlend)
|
||||||
|
|
||||||
|
timeIt "rect Mask NormalBlend":
|
||||||
mask.fillPath(rect, blendMode = NormalBlend)
|
mask.fillPath(rect, blendMode = NormalBlend)
|
||||||
|
|
||||||
timeIt "rect Mask MaskBlend":
|
timeIt "rect Mask MaskBlend":
|
||||||
let mask = newMask(width, height)
|
|
||||||
mask.fill(255)
|
mask.fill(255)
|
||||||
mask.fillPath(rect, blendMode = MaskBlend)
|
mask.fillPath(rect, blendMode = MaskBlend)
|
||||||
|
|
||||||
timeIt "rect Mask SubtractMaskBlend":
|
timeIt "rect Mask SubtractMaskBlend":
|
||||||
let mask = newMask(width, height)
|
|
||||||
mask.fill(255)
|
mask.fill(255)
|
||||||
mask.fillPath(rect, blendMode = SubtractMaskBlend)
|
mask.fillPath(rect, blendMode = SubtractMaskBlend)
|
||||||
|
|
||||||
timeIt "rect Mask ExcludeMaskBlend":
|
timeIt "rect Mask ExcludeMaskBlend":
|
||||||
let mask = newMask(width, height)
|
|
||||||
mask.fill(255)
|
mask.fill(255)
|
||||||
mask.fillPath(rect, blendMode = ExcludeMaskBlend)
|
mask.fillPath(rect, blendMode = ExcludeMaskBlend)
|
||||||
|
|
||||||
timeIt "roundedRect Mask OverwriteBlend":
|
timeIt "roundedRect Mask OverwriteBlend":
|
||||||
let mask = newMask(width, height)
|
|
||||||
mask.fillPath(roundedRect, blendMode = OverwriteBlend)
|
mask.fillPath(roundedRect, blendMode = OverwriteBlend)
|
||||||
|
|
||||||
timeIt "roundedRect Mask NormalBlend":
|
timeIt "roundedRect Mask NormalBlend":
|
||||||
let mask = newMask(width, height)
|
|
||||||
mask.fillPath(roundedRect, blendMode = NormalBlend)
|
mask.fillPath(roundedRect, blendMode = NormalBlend)
|
||||||
|
|
||||||
timeIt "roundedRect Mask MaskBlend":
|
timeIt "roundedRect Mask MaskBlend":
|
||||||
let mask = newMask(width, height)
|
|
||||||
mask.fill(255)
|
mask.fill(255)
|
||||||
mask.fillPath(roundedRect, blendMode = MaskBlend)
|
mask.fillPath(roundedRect, blendMode = MaskBlend)
|
||||||
|
|
||||||
timeIt "roundedRect Mask SubtractMaskBlend":
|
timeIt "roundedRect Mask SubtractMaskBlend":
|
||||||
let mask = newMask(width, height)
|
|
||||||
mask.fill(255)
|
mask.fill(255)
|
||||||
mask.fillPath(roundedRect, blendMode = SubtractMaskBlend)
|
mask.fillPath(roundedRect, blendMode = SubtractMaskBlend)
|
||||||
|
|
||||||
timeIt "roundedRect Mask ExcludeMaskBlend":
|
timeIt "roundedRect Mask ExcludeMaskBlend":
|
||||||
let mask = newMask(width, height)
|
|
||||||
mask.fill(255)
|
mask.fill(255)
|
||||||
mask.fillPath(roundedRect, blendMode = ExcludeMaskBlend)
|
mask.fillPath(roundedRect, blendMode = ExcludeMaskBlend)
|
||||||
|
|
Loading…
Reference in a new issue