Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type PaintPtr = Ptr Paint
- newtype Extent = Extent (V2 CFloat)
- data Paint = Paint {
- xform :: Transformation
- extent :: Extent
- radius :: !CFloat
- feather :: !CFloat
- innerColor :: !Color
- outerColor :: !Color
- image :: !Image
- linearGradient :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> Color -> Color -> IO Paint
- boxGradient :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> Color -> Color -> IO Paint
- radialGradient :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> Color -> Color -> IO Paint
- imagePattern :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> Image -> CFloat -> IO Paint
- linearGradient'_ :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> ColorPtr -> ColorPtr -> PaintPtr -> IO ()
- boxGradient'_ :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> ColorPtr -> ColorPtr -> PaintPtr -> IO ()
- radialGradient'_ :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> ColorPtr -> ColorPtr -> PaintPtr -> IO ()
- imagePattern'_ :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CInt -> CFloat -> PaintPtr -> IO ()
Documentation
Paint | |
|
linearGradient :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> Color -> Color -> IO Paint Source #
Creates and returns a linear gradient. Parameters (sx,sy)-(ex,ey) specify the start and end coordinates
of the linear gradient, icol specifies the start color and ocol the end color.
The gradient is transformed by the current transform when it is passed to fillPaint
or strokePaint
.
boxGradient :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> Color -> Color -> IO Paint Source #
Creates and returns a box gradient. Box gradient is a feathered rounded rectangle, it is useful for rendering
drop shadows or highlights for boxes. Parameters (x,y) define the top-left corner of the rectangle,
(w,h) define the size of the rectangle, r defines the corner radius, and f feather. Feather defines how blurry
the border of the rectangle is. Parameter icol specifies the inner color and ocol the outer color of the gradient.
The gradient is transformed by the current transform when it is passed to fillPaint
or strokePaint
.
radialGradient :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> Color -> Color -> IO Paint Source #
Creates and returns a radial gradient. Parameters (cx,cy) specify the center, inr and outr specify
the inner and outer radius of the gradient, icol specifies the start color and ocol the end color.
The gradient is transformed by the current transform when it is passed to fillPaint
or strokePaint
.
imagePattern :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> Image -> CFloat -> IO Paint Source #
Creates and returns an image patter. Parameters (ox,oy) specify the left-top location of the image pattern,
(ex,ey) the size of one image, angle rotation around the top-left corner, image is handle to the image to render.
The gradient is transformed by the current transform when it is passed to fillPaint
or strokePaint
.
linearGradient'_ :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> ColorPtr -> ColorPtr -> PaintPtr -> IO () Source #
boxGradient'_ :: Context -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> CFloat -> ColorPtr -> ColorPtr -> PaintPtr -> IO () Source #