Hoogle Search

Within LTS Haskell 24.58 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. SubpixelOrderVrgb :: SubpixelOrder

    cairo Graphics.Rendering.Cairo

    No documentation available.

  2. fontOptionsGetSubpixelOrder :: MonadIO m => FontOptions -> m SubpixelOrder

    cairo Graphics.Rendering.Cairo

    Gets the subpixel order for the font options object. See the documentation for SubpixelOrder for full details.

  3. fontOptionsSetSubpixelOrder :: MonadIO m => FontOptions -> SubpixelOrder -> m ()

    cairo Graphics.Rendering.Cairo

    Sets the subpixel order for the font options object. The subpixel order specifies the order of color elements within each pixel on the display device when rendering with an antialiasing mode of AntialiasSubpixel. See the documentation for SubpixelOrder for full details.

  4. getFontMatrix :: Render Matrix

    cairo Graphics.Rendering.Cairo

    Gets the current font matrix, as set by setFontMatrix

  5. getMatrix :: Render Matrix

    cairo Graphics.Rendering.Cairo

    Gets the current transformation matrix, as set by setMatrix.

  6. identityMatrix :: Render ()

    cairo Graphics.Rendering.Cairo

    Resets the current transformation matrix (CTM) by setting it equal to the identity matrix. That is, the user-space and device-space axes will be aligned and one user-space unit will transform to one device-space unit.

  7. imageSurfaceGetPixels :: Storable e => Surface -> IO (SurfaceData Int e)

    cairo Graphics.Rendering.Cairo

    Retrieve the internal array of raw image data.

    • Image data in an image surface is stored in memory in uncompressed, packed format. Rows in the image are stored top to bottom, and in each row pixels are stored from left to right. There may be padding at the end of a row. The value returned by imageSurfaceGetStride indicates the number of bytes between rows.
    • The returned array is a flat representation of a three dimensional array: x-coordinate, y-coordinate and several channels for each color. The format depends on the Format of the surface:
    FormatARGB32: each pixel is 32 bits with alpha in the upper 8 bits, followed by 8 bits for red, green and blue. Pre-multiplied alpha is used. (That is, 50% transparent red is 0x80800000, not 0x80ff0000.) FormatRGB24: each pixel is 32 bits with the upper 8 bits being unused, followed by 8 bits for red, green and blue. FormatA8: each pixel is 8 bits holding an alpha value FormatA1: each pixel is one bit where pixels are packed into 32 bit quantities. The ordering depends on the endianness of the platform. On a big-endian machine, the first pixel is in the uppermost bit, on a little-endian machine the first pixel is in the least-significant bit.
    • To read or write a specific pixel (and assuming FormatARGB32 or FormatRGB24), use the formula: p = y * (rowstride div 4) + x for the pixel and force the array to have 32-bit words or integers.
    • Calling this function without explicitly giving it a type will often lead to a compiler error since the type parameter e is underspecified. If this happens the function can be explicitly typed: surData <- (imageSurfaceGetPixels pb :: IO (SurfaceData Int Word32))
    • If modifying an image through Haskell's array interface is not fast enough, it is possible to use unsafeRead and unsafeWrite which have the same type signatures as readArray and writeArray. Note that these are internal functions that might change with GHC.
    • After each write access to the array, you need to inform Cairo about the area that has changed using surfaceMarkDirty.
    • The function will return an error if the surface is not an image surface or if surfaceFinish has been called on the surface.

  8. patternGetMatrix :: MonadIO m => Pattern -> m Matrix

    cairo Graphics.Rendering.Cairo

    Get the pattern's transformation matrix.

  9. patternSetMatrix :: MonadIO m => Pattern -> Matrix -> m ()

    cairo Graphics.Rendering.Cairo

    Sets the pattern's transformation matrix to matrix. This matrix is a transformation from user space to pattern space. When a pattern is first created it always has the identity matrix for its transformation matrix, which means that pattern space is initially identical to user space. Important: Please note that the direction of this transformation matrix is from user space to pattern space. This means that if you imagine the flow from a pattern to user space (and on to device space), then coordinates in that flow will be transformed by the inverse of the pattern matrix. Also, please note the discussion of the user-space locking semantics of setSource.

  10. setFontMatrix :: Matrix -> Render ()

    cairo Graphics.Rendering.Cairo

    Sets the current font matrix to matrix. The font matrix gives a transformation from the design space of the font (in this space, the em-square is 1 unit by 1 unit) to user space. Normally, a simple scale is used (see setFontSize), but a more complex font matrix can be used to shear the font or stretch it unequally along the two axes.

Page 248 of many | Previous | Next