Pango::Cairo(3)
Pango::Cairo(3) but make it make sense π
okay so bestie, this is the Pango::Cairo(3) page from the User Contributed Perl Documentation. it's literally the glue between Pango (the text layout queen) and Cairo (the drawing icon), and i'm gonna walk you through every single method so you can slay your rendering game. no cap, let's get into it. β¨
β¨ METHODS β¨
layout = Pango::Cairo::create_layout ($cr)
makes you a fresh new layout tied to that cairo context. main character energy fr.
$crβ aCairo::Context, the canvas bestie we're all drawing on π¨
Pango::Cairo::error_underline_path ($cr, $x, $y, $width, $height)
builds the path for that squiggly error underline. you know the vibe β the little red wiggle under a typo. it's giving "your code has issues" but make it art.
$crβ aCairo::ContextποΈ$xβ adouble, the x coord$yβ adouble, the y coord$widthβ adouble, how wide$heightβ adouble, how tall
Since: pango 1.14 π«Ά
Pango::Cairo::glyph_string_path ($cr, $font, $glyphs)
adds the path for a whole glyph string to the context. this is the "draw the letters as outlines" moment. lowkey iconic.
$crβ aCairo::Contextπ$fontβ aPango::Font, the font doing the heavy lifting$glyphsβ aPango::GlyphString, all the glpyhs in a cute little row
Pango::Cairo::layout_line_path ($cr, $line)
path-ifies one single line of a layout. one line, one vibe, one path. periodt.
$crβ aCairo::Contextπ$lineβ aPango::LayoutLine, the line in question
Pango::Cairo::layout_path ($cr, $layout)
now we're doing the WHOLE layout as a path. every line, all at once. highkey satisfying.
$crβ aCairo::Contextπ¦$layoutβ aPango::Layout, the full layout
Pango::Cairo::show_error_underline ($cr, $x, $y, $width, $height)
same squiggly error underline energy as above, but this one draws it directly instead of just making a path. instant gratification, no waiting. π
$crβ aCairo::ContextβοΈ$xβ adouble$yβ adouble$widthβ adouble$heightβ adouble
Since: pango 1.14 π«Ά
Pango::Cairo::show_glyph_string ($cr, $font, $glyphs)
draws the glyph string straight onto the context. no path middleman, we're going direct. slay.
$crβ aCairo::Contextπ$fontβ aPango::Font$glyphsβ aPango::GlyphString
Pango::Cairo::show_layout ($cr, $layout)
renders the entire layout right there on the context. the full text, all of it, rendered. obsessed. π₯
$crβ aCairo::Contextπ¨$layoutβ aPango::Layout
Pango::Cairo::show_layout_line ($cr, $line)
just one line of the layout, drawn directly. sometimes you only need a little snack, not the whole meal. π
$crβ aCairo::Contextβ¨$lineβ aPango::LayoutLine
Pango::Cairo::update_context ($cr, $context)
syncs your cairo context's font options and stuff over to the pango context. keeping them on the same page, as besties do. π«Ά
$crβ aCairo::Contextπ$contextβ aPango::Context
Pango::Cairo::update_layout ($cr, $layout)
updates a layout with whatever the cairo context is doing. keeps your layout vibing correctly with the graphics context. no cap.
$crβ aCairo::ContextπΈ$layoutβ aPango::Layout
π SEE ALSO π
Pango β go check the parent page, it's the whole universe this lives in π
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Pango for a full notice.
and that's the whole page bestie! π
this was perl v5.42.0, dated 2019-09-16, Pango::Cairo(3) β go forth and render your little heart out. you got this. π¦β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Pango 1.227-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Pango 1.227-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Pango 1.227-bp160.1.13 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Pango 1.227-bp160.1.13 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms