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.
extentsToPixels :: (HasCallStack, MonadIO m) => Maybe Rectangle -> Maybe Rectangle -> m ()gi-pango GI.Pango.Functions Converts extents from Pango units to device units. The conversion is done by dividing by the SCALE factor and performing rounding. The inclusive rectangle is converted by flooring the x/y coordinates and extending width/height, such that the final rectangle completely includes the original rectangle. The nearest rectangle is converted by rounding the coordinates of the rectangle to the nearest device unit (pixel). The rule to which argument to use is: if you want the resulting device-space rectangle to completely contain the original rectangle, pass it in as inclusive. If you want two touching-but-not-overlapping rectangles stay touching-but-not-overlapping after rounding to device units, pass them in as nearest. Since: 1.16
contextGetMatrix :: (HasCallStack, MonadIO m, IsContext a) => a -> m (Maybe Matrix)gi-pango GI.Pango.Objects.Context Gets the transformation matrix that will be applied when rendering with this context. See contextSetMatrix. Since: 1.6
contextSetMatrix :: (HasCallStack, MonadIO m, IsContext a) => a -> Maybe Matrix -> m ()gi-pango GI.Pango.Objects.Context Sets the transformation matrix that will be applied when rendering with this context. Note that reported metrics are in the user space coordinates before the application of the matrix, not device-space coordinates after the application of the matrix. So, they don't scale with the matrix, though they may change slightly for different matrices, depending on how the text is fit to the pixel grid. Since: 1.6
layoutGetPixelExtents :: (HasCallStack, MonadIO m, IsLayout a) => a -> m (Rectangle, Rectangle)gi-pango GI.Pango.Objects.Layout Computes the logical and ink extents of layout in device units. This function just calls layoutGetExtents followed by two [funcextentsToPixels] calls, rounding inkRect and logicalRect such that the rounded rectangles fully contain the unrounded one (that is, passes them as first argument to extentsToPixels).
layoutGetPixelSize :: (HasCallStack, MonadIO m, IsLayout a) => a -> m (Int32, Int32)gi-pango GI.Pango.Objects.Layout Determines the logical width and height of a PangoLayout in device units. layoutGetSize returns the width and height scaled by SCALE. This is simply a convenience function around layoutGetPixelExtents.
rendererGetMatrix :: (HasCallStack, MonadIO m, IsRenderer a) => a -> m (Maybe Matrix)gi-pango GI.Pango.Objects.Renderer Gets the transformation matrix that will be applied when rendering. See rendererSetMatrix. Since: 1.8
rendererSetMatrix :: (HasCallStack, MonadIO m, IsRenderer a) => a -> Maybe Matrix -> m ()gi-pango GI.Pango.Objects.Renderer Sets the transformation matrix that will be applied when rendering. Since: 1.8
layoutLineGetPixelExtents :: (HasCallStack, MonadIO m) => LayoutLine -> m (Rectangle, Rectangle)gi-pango GI.Pango.Structs.LayoutLine Computes the logical and ink extents of layoutLine in device units. This function just calls layoutLineGetExtents followed by two [funcextentsToPixels] calls, rounding inkRect and logicalRect such that the rounded rectangles fully contain the unrounded one (that is, passes them as first argument to [funcextentsToPixels]).
module GI.Pango.Structs.
Matrix A PangoMatrix specifies a transformation between user-space and device coordinates. The transformation is given by
x_device = x_user * matrix->xx + y_user * matrix->xy + matrix->x0; y_device = x_user * matrix->yx + y_user * matrix->yy + matrix->y0;
Since: 1.6-
gi-pango GI.Pango.Structs.Matrix Memory-managed wrapper type.