Hello,
I tried to render a closed path, consisting of a single cubic bezier. But on some sizes, it renders nothing.
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# OPTIONS_GHC -fno-warn-tabs #-}
import Codec.Picture (PixelRGBA8(..), writePng)
import Graphics.Rasterific
import Graphics.Rasterific.Texture
import Graphics.Rasterific.Transformations
generateImage a = let
(imgx, imgy) = (1280, 720)
in renderDrawing imgx imgy (greyN 200) $
withTransformation (translate (V2 (imgx/2) (imgy/2))) $
withTexture (uniformTexture (greyN 100)) $ fill $
Path (V2 0 0) True [PathCubicBezierCurveTo (V2 a a) (V2 a (-a)) (V2 0 0)]
greyN n = PixelRGBA8 n n n 255
main = do
writePng "IssueSample.png" $ generateImage 400
writePng "IssueSample2.png" $ generateImage 300
The code generates two images, which both should show a filled path. However, the second image is empty.
I experimented a bit with the sizes. The working path size seems to depend on the image size. On 1920x1080, it also won't show the filled path in the first image.
Hello, I tried to render a closed path, consisting of a single cubic bezier. But on some sizes, it renders nothing.
The code generates two images, which both should show a filled path. However, the second image is empty.
I experimented a bit with the sizes. The working path size seems to depend on the image size. On 1920x1080, it also won't show the filled path in the first image.