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.
SubpixelOrderVrgb :: SubpixelOrdercairo Graphics.Rendering.Cairo No documentation available.
fontOptionsGetSubpixelOrder :: MonadIO m => FontOptions -> m SubpixelOrdercairo Graphics.Rendering.Cairo Gets the subpixel order for the font options object. See the documentation for SubpixelOrder for full details.
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.
getFontMatrix :: Render Matrixcairo Graphics.Rendering.Cairo Gets the current font matrix, as set by setFontMatrix
-
cairo Graphics.Rendering.Cairo Gets the current transformation matrix, as set by setMatrix.
-
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.
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:
- 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.
patternGetMatrix :: MonadIO m => Pattern -> m Matrixcairo Graphics.Rendering.Cairo Get the pattern's transformation matrix.
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.
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.