Files
ServerSync/lib/pygments/formatters/__pycache__/img.cpython-314.pyc

271 lines
29 KiB
Plaintext
Raw Normal View History

2026-02-12 02:28:23 +02:00
+
<00> <0C>i[<00> <00><><00>Rt^RIt^RIt^RIHt^RIHtHtHtH t ^RI
t
^RI H t H t HtRt^RIt.R!OtR .R"OR R R.RR.RRR./tRtRtRt!RR]4t!RR]4t!RR4t!RR]4t!RR]4t!RR ]4t!R R
]4tR# ]dRtLyi;i ]d^RItL<> ]dRtL<>i;ii;i)#z<>
pygments.formatters.img
~~~~~~~~~~~~~~~~~~~~~~~
Formatter for Pixmap output.
:copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
N)<01> Formatter)<04> get_bool_opt<70> get_int_opt<70> get_list_opt<70>get_choice_opt)<03>Image<67> ImageDraw<61> ImageFontTF<54>ImageFormatter<65>GifImageFormatter<65>JpgImageFormatter<65>BmpImageFormatter<65>NORMAL<41>ITALIC<49>Oblique<75>Italic<69>BOLD<4C>Bold<6C>
BOLDITALICz Bold Obliquez Bold ItaliczDejaVu Sans Monoz Courier New<65>Menloc<00><00>]tRt^4tRtRtR#)<04>PilNotAvailablez,When Python imaging library is not available<6C>N<><06>__name__<5F>
__module__<EFBFBD> __qualname__<5F>__firstlineno__<5F>__doc__<5F>__static_attributes__r<00><00>>/tmp/pip-target-qd_sq_1j/lib/python/pygments/formatters/img.pyrr4s<00><00>6r rc<00><00>]tRt^8tRtRtR#)<04> FontNotFoundz(When there are no usable fonts specifiedrNrrr r!r#r#8s<00><00>2r r#c<00>na<00>]tRt^<toRtRRltRtRtRtRt RRlt
Rt R t R
t R tR tR tVtR#)<11> FontManagerz6
Manages a set of fonts: normal, italic, bold, etc...
c<08><><00>WnW n/VnRVnRVn\ VR4'g&\ PPV4'dE\P!WP4pRVn\FpW0PV&K R#\PPR4'd&V'g \VnVP!4R#\PPR4'd&V'g \"VnVP%4R#V'g \&VnVP)4R#)NF<4E>readT<64>win<69>darwin)<15> font_name<6D> font_size<7A>fonts<74>encoding<6E>variable<6C>hasattr<74>os<6F>path<74>isfiler <00>truetype<70>STYLES<45>sys<79>platform<72>
startswith<EFBFBD>DEFAULT_FONT_NAME_WIN<49> _create_win<69>DEFAULT_FONT_NAME_MAC<41> _create_mac<61>DEFAULT_FONT_NAME_NIX<49> _create_nix)<05>selfr*r+<00>font<6E>styles&&& r!<00>__init__<5F>FontManager.__init__As<><00><00>"<22><0E>"<22><0E><17><04>
<EFBFBD><1C><04> <0A><1D><04> <0A> <12>9<EFBFBD>f<EFBFBD> %<25> %<25><12><17><17><1E><1E> <09>)B<>)B<><1C>%<25>%<25>i<EFBFBD><1E><1E>@<40>D<EFBFBD> <20>D<EFBFBD>M<EFBFBD><1F><05>$(<28>
<EFBFBD>
<EFBFBD>5<EFBFBD>!<21> <20> <13> <0E><<3C><<3C> "<22> "<22>5<EFBFBD> )<29> )<29><1C>!6<><04><0E> <10> <1C> <1C> <1E> <10>\<5C>\<5C> $<24> $<24>X<EFBFBD> .<2E> .<2E><1C>!6<><04><0E> <10> <1C> <1C> <1E><1C>!6<><04><0E> <10> <1C> <1C> r c<08><><00>\P!RV RV 2R.\PRR7pVP4wrEVP^8XdnVP 4pVFUpVP R4'dKVP4P4PR4pV'gKSVu# R#R#)zfc-listz:style=<3D>fileN)<02>stdout<75>stderrsFontconfig warning:<3A>:) <09>
subprocess<EFBFBD>Popen<65>PIPE<50> communicate<74>
returncode<EFBFBD>
splitlinesr7<00>decode<64>strip) r><00>namer@<00>procrE<00>_<>lines<65>liner1s &&& r!<00>_get_nix_font_path<74>FontManager._get_nix_font_path\s<><00><00><19><1F><1F><19>t<EFBFBD>f<EFBFBD>G<EFBFBD>E<EFBFBD>7<EFBFBD>,C<>V<EFBFBD> L<>'1<><EFBFBD><EFBFBD>t<EFBFBD>E<01><04><18>$<24>$<24>&<26> <09><06> <0F>?<3F>?<3F>a<EFBFBD> <1F><1A>%<25>%<25>'<27>E<EFBFBD><1D><04><17>?<3F>?<3F>#9<>:<3A>:<3A><1C><1B>{<7B>{<7B>}<7D>*<2A>*<2A>,<2C>2<>2<>3<EFBFBD>7<><04><17>4<EFBFBD><1F>K<EFBFBD> <1E> <18> r c<08>j<00>\R,FRpVPVPV4pVfK%\P!W P
4VP R&M \RVP R24hRF<>p\V,FSpVPVPV4pVfK%\P!W P
4VP V&Ke VR8Xd#VP R,VP V&K<>VP R,VP V&K<> R#)rN<>No usable fonts named: "<22>"rr<00>rrr)r4rUr*r r3r+r,r#)r>rPr1r@<00> stylenames& r!r=<00>FontManager._create_nixjs<><00><00><1A>8<EFBFBD>$<24>$<24>D<EFBFBD><17>*<2A>*<2A>4<EFBFBD>><3E>><3E>4<EFBFBD>@<40>D<EFBFBD><13><1F>'0<>'9<>'9<>$<24><0E><0E>'O<><04>
<EFBFBD>
<EFBFBD>8<EFBFBD>$<24><15> %<25> <1F>!9<>$<24>.<2E>.<2E>9I<39><11>K<>L<> L<>5<>E<EFBFBD>#<23>E<EFBFBD>]<5D>]<5D> <09><1B>.<2E>.<2E>t<EFBFBD>~<7E>~<7E>y<EFBFBD>I<><04><17>#<23>(1<>(:<3A>(:<3A>4<EFBFBD><1E><1E>(P<>D<EFBFBD>J<EFBFBD>J<EFBFBD>u<EFBFBD>%<25><19> +<2B> <19>L<EFBFBD>(<28>(,<2C>
<EFBFBD>
<EFBFBD>6<EFBFBD>(:<3A>D<EFBFBD>J<EFBFBD>J<EFBFBD>u<EFBFBD>%<25>(,<2C>
<EFBFBD>
<EFBFBD>8<EFBFBD>(<<3C>D<EFBFBD>J<EFBFBD>J<EFBFBD>u<EFBFBD>%<25>6r c<08>x<00>VPVR,V,P4P44#)<01> )<03>getrO<00>lower)r><00>font_maprPr@s&&&&r!<00>_get_mac_font_path<74>FontManager._get_mac_font_path~s,<00><00><17>|<7C>|<7C>T<EFBFBD>C<EFBFBD>Z<EFBFBD>%<25>/<2F>6<>6<>8<>><3E>><3E>@<40>A<>Ar c<08>Ja<06>/p\PP\P!R4R4RR3F2oVP V3Rl\P
!S444K4 \ R,FRpVPWPV4pVfK%\P!W0P4VPR&M \RVP R24hR F<>p\ V,FSpVPWPV4pVfK%\P!W0P4VPV&Ke VR
8Xd#VPR ,VPV&K<>VPR,VPV&K<> R#) <0C>HOMEzLibrary/Fonts/z/Library/Fonts/z/System/Library/Fonts/c3<00>2<"<00>TF<>wrVF<>pVP4PR4'gK*\PP V4^,P4\PP SV43x<00>K<> K<> R#5i)<03>ttfN)rg<00>ttc)r`<00>endswithr0r1<00>splitext<78>join)<05>.0rR<00>files<65>f<>font_dirs& <20>r!<00> <genexpr><3E>*FontManager._create_mac.<locals>.<genexpr><3E>sr<00><><00><00>7<>#4<>K<EFBFBD>A<EFBFBD>q<EFBFBD><1E>A<EFBFBD><14>7<EFBFBD>7<EFBFBD>9<EFBFBD>%<25>%<25>n<EFBFBD>5<>L<01><12><17><17>!<21>!<21>!<21>$<24>Q<EFBFBD>'<27>-<2D>-<2D>/<2F><12><17><17><1C><1C>h<EFBFBD><01>1J<31>K<><1E>L<01>#4<>s <00>/B<01>A BrNrXrYrrrZ)r0r1rk<00>getenv<6E>update<74>walkr4rbr*r r3r+r,r#)r>rarPr1r@r[ros& @r!r;<00>FontManager._create_mac<61>sT<00><><00><15><08><1B><17><17><1C><1C>b<EFBFBD>i<EFBFBD>i<EFBFBD><06>&7<>9I<39>J<>*<2A>,D<>F<01>H<EFBFBD> <14>O<EFBFBD>O<EFBFBD>7<>#%<25>7<EFBFBD>7<EFBFBD>8<EFBFBD>#4<>7<> 7<>F<01><1B>8<EFBFBD>$<24>$<24>D<EFBFBD><17>*<2A>*<2A>8<EFBFBD>^<5E>^<5E>T<EFBFBD>J<>D<EFBFBD><13><1F>'0<>'9<>'9<>$<24><0E><0E>'O<><04>
<EFBFBD>
<EFBFBD>8<EFBFBD>$<24><15> %<25> <1F>!9<>$<24>.<2E>.<2E>9I<39><11>K<>L<> L<>5<>E<EFBFBD>#<23>E<EFBFBD>]<5D>]<5D> <09><1B>.<2E>.<2E>x<EFBFBD><1E><1E><19>S<><04><17>#<23>(1<>(:<3A>(:<3A>4<EFBFBD><1E><1E>(P<>D<EFBFBD>J<EFBFBD>J<EFBFBD>u<EFBFBD>%<25><19> +<2B> <19>L<EFBFBD>(<28>(,<2C>
<EFBFBD>
<EFBFBD>6<EFBFBD>(:<3A>D<EFBFBD>J<EFBFBD>J<EFBFBD>u<EFBFBD>%<25>(,<2C>
<EFBFBD>
<EFBFBD>8<EFBFBD>(<<3C>D<EFBFBD>J<EFBFBD>J<EFBFBD>u<EFBFBD>%<25>6r c<08><00>RFLpVFCpRPY&;'d
RV,V4p\P!W4wr<>Vuu# KN V'd\ RV RV^, R24hR# \dK|i;i)<08>z{}{}{}r^zFont z (z) not found in registryN)rwz (TrueType))<05>format<61>_winreg<65> QueryValueEx<45>OSErrorr#)
r><00>key<65>basename<6D>styles<65>fail<69>suffixr@<00>valname<6D>valrRs
&&&&& r!<00> _lookup_win<69>FontManager._lookup_win<69>s<><00><00>)<29>F<EFBFBD><1F><05><1D>&<26>o<EFBFBD>o<EFBFBD>h<EFBFBD>8K<38>8K<38>#<23>e<EFBFBD>)<29>V<EFBFBD>T<>G<EFBFBD>$<24>1<>1<>#<23>?<3F>F<EFBFBD>C<EFBFBD><1E>J<EFBFBD>  <20>*<2A><14>"<22>U<EFBFBD>8<EFBFBD>*<2A>B<EFBFBD>v<EFBFBD>a<EFBFBD>y<EFBFBD>k<EFBFBD>AX<41>#Y<>Z<>Z<><17><> <1F><1D><1C><1D>s<00>A6<04>(A6<04>6 B<07>Bc<08><><00>Rp\PR3\PR3\PR3\PR3.pVEF6p\P!V!pVP W@P
\ R,R4p\P!WPP4VPR&RF<>pVP W@P
\ V,4pV'd0\P!WPP4VPV&KaVR8Xd#VPR,VPV&K<>VPR,VPV&K<> \P!V4R# V'dVh\R4h \d pTpRp?MRp?ii;i\P!T4EK<> \P!T4i;i \dEK<>i;i) Nz2Software\Microsoft\Windows NT\CurrentVersion\Fontsz/Software\Microsoft\Windows\CurrentVersion\FontsrTrrz$Can't open Windows font registry keyrZ)ry<00>HKEY_CURRENT_USER<45>HKEY_LOCAL_MACHINE<4E>OpenKeyr<79>r*r4r r3r+r,<00>CloseKeyr#r{)r><00> lookuperror<6F>keynames<65>keynamer|r1r@<00>errs& r!r9<00>FontManager._create_win<69>s<><00><00><1A> <0B><1D>/<2F>/<2F>1f<31>g<><1D>/<2F>/<2F>1c<31>d<><1D>0<>0<>2g<32>h<><1D>0<>0<>2d<32>e<>h<01><08> <20>G<EFBFBD> <15><1D>o<EFBFBD>o<EFBFBD>w<EFBFBD>/<2F><03>*<2A><1F>+<2B>+<2B>C<EFBFBD><1E><1E><16><08>AQ<41>SW<53>X<>D<EFBFBD>+4<>+=<3D>+=<3D>d<EFBFBD>N<EFBFBD>N<EFBFBD>+S<>D<EFBFBD>J<EFBFBD>J<EFBFBD>x<EFBFBD>(<28>!A<><05>#<23>/<2F>/<2F><03>^<5E>^<5E>V<EFBFBD>E<EFBFBD>]<5D>S<><04><1F>09<30>0B<30>0B<30>4<EFBFBD><1E><1E>0X<30>D<EFBFBD>J<EFBFBD>J<EFBFBD>u<EFBFBD>-<2D>$<24> <0C>4<>48<34>J<EFBFBD>J<EFBFBD>v<EFBFBD>4F<34><04>
<EFBFBD>
<EFBFBD>5<EFBFBD> 1<>48<34>J<EFBFBD>J<EFBFBD>x<EFBFBD>4H<34><04>
<EFBFBD>
<EFBFBD>5<EFBFBD> 1<>"B<01><1B><1C>$<24>$<24>S<EFBFBD>)<29>' <20>:<1B>!<21>!<21><1E>F<>G<> G<><47>$<24>&<26>"%<25>K<EFBFBD><4B>&<26><><1F><1B>$<24>$<24>S<EFBFBD>)<29><>G<EFBFBD>$<24>$<24>S<EFBFBD>)<29><><1A> <15><14> <15>sO<00>G*<02>%DF<02>+G*<02> F2<05>&F-<05>(G<02>-F2<05>2G<02>6G*<02>G'<05>'G*<02>* G:<05>9G:c <0C>$<00>VPR4#)z
Get the character size.
<EFBFBD>M)<01> get_text_size<7A>r>s&r!<00> get_char_size<7A>FontManager.get_char_size<7A>s<00><00><14>!<21>!<21>#<23>&<26>&r c <0C><><00>VPR,p\VR4'dVPV4R,#VPV4#)z$
Get the text size (width, height).
r<00>getbbox:<3A><00>N)r,r/r<><00>getsize)r><00>textr?s&& r!r<><00>FontManager.get_text_size<7A>sB<00><00><14>z<EFBFBD>z<EFBFBD>(<28>#<23><04> <12>4<EFBFBD><19> #<23> #<23><17><<3C><<3C><04>%<25>c<EFBFBD>*<2A> *<2A><17><<3C><<3C><04>%<25> %r c <0C><><00>V'd?V'd7VP'dVPR4#VPR,#V'd7VP'dVPR4#VPR,#V'd7VP'dVPR4#VPR,#VP'dVPR4#VPR,#)z.
Get the font based on bold and italic flags.
rrrr)r.<00> get_styler,)r><00>bold<6C>obliques&&&r!<00>get_font<6E>FontManager.get_font<6E>s<><00><00> <10>G<EFBFBD><13>}<7D>}<7D>}<7D><1B>~<7E>~<7E>l<EFBFBD>3<>3<><17>:<3A>:<3A>l<EFBFBD>+<2B> +<2B> <11><13>}<7D>}<7D>}<7D><1B>~<7E>~<7E>f<EFBFBD>-<2D>-<2D><17>:<3A>:<3A>f<EFBFBD>%<25> %<25> <14><13>}<7D>}<7D>}<7D><1B>~<7E>~<7E>h<EFBFBD>/<2F>/<2F><17>:<3A>:<3A>h<EFBFBD>'<27> '<27><13>}<7D>}<7D>}<7D><1B>~<7E>~<7E>h<EFBFBD>/<2F>/<2F><17>:<3A>:<3A>h<EFBFBD>'<27> 'r c <0C><><00>VPV,p\V,FpVPV4Vu# V# \dK+\dTuu#i;i)ze
Get the specified style of the font if it is a variable font.
If not found, return the normal font.
)r,r4<00>set_variation_by_name<6D>
ValueErrorr{)r>r@r?<00>
style_names&& r!r<><00>FontManager.get_style<6C>sb<00><00>
<14>z<EFBFBD>z<EFBFBD>%<25> <20><04> <20><15>-<2D>-<2D>J<EFBFBD> <1C><14>*<2A>*<2A>:<3A>6<><1B> <0B>(<28><14> <0B><> <1E> <15><14><1A> <1C><1B> <0B> <1C>s<00>><02> A<05> A<05>A<05>A)r-r*r+r,r.N)<01>)F)rrrrrrArUr=rbr;r<>r9r<>r<>r<>r<>r<00>__classdictcell__<5F><01> __classdict__s@r!r%r%<sI<00><><00><00><08><1F>6 <18>=<3D>(B<01>=<3D>: <18>%H<01>N'<27> &<26>(<28>2<14>r r%c<00><>a<00>]tRtRtoRtRt.ROtR.tRtRt Rt
RRlt R t R
t R tR tR tRtRtRtRtRtRtRtRtRtRtRtRtVtR#)r
ia#
Create a PNG image from source code. This uses the Python Imaging Library to
generate a pixmap from the source code.
.. versionadded:: 0.10
Additional options accepted:
`image_format`
An image format to output to that is recognised by PIL, these include:
* "PNG" (default)
* "JPEG"
* "BMP"
* "GIF"
`line_pad`
The extra spacing (in pixels) between each line of text.
Default: 2
`font_name`
The font name to be used as the base font from which others, such as
bold and italic fonts will be generated. This really should be a
monospace font to look sane.
If a filename or a file-like object is specified, the user must
provide different styles of the font.
Default: "Courier New" on Windows, "Menlo" on Mac OS, and
"DejaVu Sans Mono" on \*nix
`font_size`
The font size in points to be used.
Default: 14
`image_pad`
The padding, in pixels to be used at each edge of the resulting image.
Default: 10
`line_numbers`
Whether line numbers should be shown: True/False
Default: True
`line_number_start`
The line number of the first line.
Default: 1
`line_number_step`
The step used when printing line numbers.
Default: 1
`line_number_bg`
The background colour (in "#123456" format) of the line number bar, or
None to use the style background color.
Default: "#eed"
`line_number_fg`
The text color of the line numbers (in "#123456"-like format).
Default: "#886"
`line_number_chars`
The number of columns of line numbers allowable in the line number
margin.
Default: 2
`line_number_bold`
Whether line numbers will be bold: True/False
Default: False
`line_number_italic`
Whether line numbers will be italicized: True/False
Default: False
`line_number_separator`
Whether a line will be drawn between the line number area and the
source code area: True/False
Default: True
`line_number_pad`
The horizontal padding (in pixels) between the line number margin, and
the source code area.
Default: 6
`hl_lines`
Specify a list of lines to be highlighted.
.. versionadded:: 1.2
Default: empty list
`hl_color`
Specify the color for highlighting lines.
.. versionadded:: 1.2
Default: highlight color of the selected style
<EFBFBD>img<6D>pngz*.pngFc <0C><><00>\'g \R4h\P!V3/VBRVn\ VP 4VnVP Pf RVnMVP PVn\VR.ROVPRR7Vn \VR^
4Vn \VR ^4Vn\VR
^4p\VP!R R 4V4VnVP"P%4wVnVnVP!R R4VnVP!RR4Vn\VR^4Vn\1VRR4Vn\1VRR4Vn\VR^4Vn\1VRR4Vn\1VRR4Vn\VR^4Vn\VR^4VnVP8'd<VP&VP.,VP6^,,Vn M^Vn .Vn!\EVR.4pVF(pVPBPG\IV44K* VP!RVP PL4;'gRVn'.Vn(R# \JdKxi;i)z5
See the class docstring for explanation of options.
z5Python Imaging Library is required for this formatter<65>latin1Nz#fff<66> image_formatT)<01>normcase<73> image_pad<61>line_padr+r*rw<00>line_number_fgz#886<38>line_number_bgz#eed<65>line_number_chars<72>line_number_boldF<64>line_number_italic<69>line_number_pad<61> line_numbers<72>line_number_separator<6F>line_number_step<65>line_number_start<72>hl_lines<65>hl_colorz#f90)r<><00>jpeg<65>gif<69>bmp))<29> pil_availablerrrAr-<00>dictr@r~<00>background_colorr<00>default_image_formatr<74>rr<>r<>r%r_r,r<><00>fontw<74>fonthr<68>r<>r<>rr<>r<>r<>r<>r<>r<>r<><00>line_number_widthr<68>r<00>append<6E>intr<74><00>highlight_colorr<72><00> drawables)r><00>options<6E>fontsize<7A> hl_lines_strrTs&, r!rA<00>ImageFormatter.__init__<5F>s<00><00><1D>}<7D>!<21>G<>I<01> I<01><11><1A><1A>4<EFBFBD>+<2B>7<EFBFBD>+<2B> <20><04> <0A><1A>4<EFBFBD>:<3A>:<3A>&<26><04> <0B> <0F>:<3A>:<3A> &<26> &<26> .<2E>$*<2A>D<EFBFBD> !<21>$(<28>J<EFBFBD>J<EFBFBD>$?<3F>$?<3F>D<EFBFBD> !<21>*<2A> <13>^<5E>%B<> <10> %<25> %<25><04>6<><04><19>%<25>W<EFBFBD>k<EFBFBD>2<EFBFBD>><3E><04><0E>#<23>G<EFBFBD>Z<EFBFBD><11>;<3B><04> <0A><1E>w<EFBFBD> <0B>R<EFBFBD>8<><08> <20><17><1B><1B>[<5B>"<22>!=<3D>x<EFBFBD>H<><04>
<EFBFBD>!%<25><1A><1A>!9<>!9<>!;<3B><1E><04>
<EFBFBD>D<EFBFBD>J<EFBFBD>%<25>k<EFBFBD>k<EFBFBD>*:<3A>F<EFBFBD>C<><04><1B>%<25>k<EFBFBD>k<EFBFBD>*:<3A>F<EFBFBD>C<><04><1B>!,<2C>W<EFBFBD>-@<40>!<21>"E<01><04><1E> ,<2C>W<EFBFBD>-?<3F><15>!H<01><04><1D>".<2E>w<EFBFBD>/C<>U<EFBFBD>#L<01><04><1F>*<2A>7<EFBFBD>4E<34>q<EFBFBD>I<><04><1C>(<28><17>.<2E>$<24>G<><04><19>%1<>'<27>2I<32>4<EFBFBD>&Q<01><04>"<22> +<2B>G<EFBFBD>5G<35><11> K<><04><1D>!,<2C>W<EFBFBD>6I<36>1<EFBFBD>!M<><04><1E> <0F> <1C> <1C> <1C>&*<2A>j<EFBFBD>j<EFBFBD>4<EFBFBD>3I<33>3I<33>&I<>&*<2A>&:<3A>&:<3A>Q<EFBFBD>&><3E>'?<3F>D<EFBFBD> "<22>&'<27>D<EFBFBD> "<22><1A><04> <0A>#<23>G<EFBFBD>Z<EFBFBD><12><<3C> <0C> <20>D<EFBFBD> <15><14> <0A> <0A>$<24>$<24>S<EFBFBD><14>Y<EFBFBD>/<2F>!<21>
 <20> <0B> <0B>J<EFBFBD>$(<28>J<EFBFBD>J<EFBFBD>$><3E>$><3E>@<01>J<01>J<01>CI<43> <0A> <0A><1B><04><0E><> <1E> <15><14> <15>s<00>$J7<02>7 K<05>Kc<08><00>\R4h)zWThe -S option is meaningless for the image formatter. Use -O style=<stylename> instead.)<01>NotImplementedError)r><00>args&&r!<00>get_style_defs<66>ImageFormatter.get_style_defs<66>s<00><00>!<21>#Q<01>R<01> Rr c <0C><<00>VPVP,#)z
Get the height of a line.
)r<>r<>r<>s&r!<00>_get_line_height<68>ImageFormatter._get_line_height<68>s<00><00><14>z<EFBFBD>z<EFBFBD>D<EFBFBD>M<EFBFBD>M<EFBFBD>)<29>)r c <0C>P<00>WP4,VP,#)z(
Get the Y coordinate of a line number.
)r<>r<><00>r><00>linenos&&r!<00> _get_line_y<5F>ImageFormatter._get_line_y<5F>s<00><00><16>-<2D>-<2D>/<2F>/<2F>$<24>.<2E>.<2E>@<40>@r c <0C><00>VP#)z
Get the width of a character.
)r<>r<>s&r!<00>_get_char_width<74>ImageFormatter._get_char_width<74>s<00><00><14>z<EFBFBD>z<EFBFBD>r c <0C>H<00>WP,VP,#)z/
Get the X coordinate of a character position.
)r<>r<>)r><00>
linelengths&&r!<00> _get_char_x<5F>ImageFormatter._get_char_x<5F>s<00><00><1A>N<EFBFBD>N<EFBFBD>*<2A>T<EFBFBD>-C<>-C<>C<>Cr c <0C>F<00>VPV4VPV43#)z<
Get the actual position for a character and line position.
)r<>r<>)r>r<>r<>s&&&r!<00> _get_text_pos<6F>ImageFormatter._get_text_pos<6F>s%<00><00><14><1F><1F>
<EFBFBD>+<2B>T<EFBFBD>-=<3D>-=<3D>f<EFBFBD>-E<>E<>Er c <0C><<00>VPVPV43#)z9
Get the actual position for the start of a line number.
)r<>r<>r<>s&&r!<00>_get_linenumber_pos<6F>"ImageFormatter._get_linenumber_pos<6F>s<00><00><15><0E><0E><04> 0<> 0<><16> 8<>9<>9r c <0C>D<00>VR,eRVR,,pV#RpV#)z5
Get the correct color for the token from the style.
<EFBFBD>color<6F>#z#000r)r>r@<00>fills&& r!<00>_get_text_color<6F>ImageFormatter._get_text_color<6F>s/<00><00> <11><17>><3E> %<25><16><15>w<EFBFBD><1E>'<27>D<EFBFBD><14> <0B><1A>D<EFBFBD><13> r c <0C>D<00>VR,eRVR,,pV#RpV#)z@
Get the correct background color for the token from the style.
<EFBFBD>bgcolorNr<4E>r)r>r@<00>bg_colors&& r!<00>_get_text_bg_color<6F>!ImageFormatter._get_text_bg_color<6F>s1<00><00> <11><19> <1B> '<27><1A>U<EFBFBD>9<EFBFBD>-<2D>-<2D>H<EFBFBD><18><0F><1C>H<EFBFBD><17>r c <0C>V<00>VPPVR,VR,4#)z%
Get the correct font for the style.
r<EFBFBD><00>italic)r,r<>)r>r@s&&r!<00>_get_style_font<6E>ImageFormatter._get_style_font<6E>s#<00><00><14>z<EFBFBD>z<EFBFBD>"<22>"<22>5<EFBFBD><16>=<3D>%<25><08>/<2F>B<>Br c <0C><><00>VPV4VP,VPV^,4VP,3#)z
Get the required image size.
)r<>r<>r<>)r><00> maxlinelength<74> maxlinenos&&&r!<00>_get_image_size<7A>ImageFormatter._get_image_sizesB<00><00><15> <20> <20><1D>/<2F>$<24>.<2E>.<2E>@<40><14> <20> <20><19>Q<EFBFBD><1D>/<2F>$<24>.<2E>.<2E>@<40>B<01> Br c <0C><00>VPVPV4\V4PVP4VP
P VPVP4VPRR7R#)z1
Remember a line number drawable to paint later.
N<EFBFBD>r?<00>text_fg<66>text_bg)
<EFBFBD>
_draw_textr<EFBFBD><00>str<74>rjustr<74>r,r<>r<>r<>r<>)r><00>posnor<6F>s&&&r!<00>_draw_linenumber<65>ImageFormatter._draw_linenumbersj<00><00> <0A><0F><0F> <10> $<24> $<24>U<EFBFBD> +<2B> <0F><06>K<EFBFBD> <1D> <1D>d<EFBFBD>4<>4<> 5<><15><1A><1A>$<24>$<24>T<EFBFBD>%:<3A>%:<3A>%)<29>%<<3C>%<<3C>><3E><18>'<27>'<27><18> <18>
r c <0C>B<00>VPPWW4V34R#)z2
Remember a single drawable tuple to paint later.
N)r<>r<>)r><00>posr<73>r?rrs&&&&&&r!r<00>ImageFormatter._draw_texts<00><00> <0A><0E><0E><1D><1D>s<EFBFBD>$<24><17>A<>Br c  <0C><><00>^;p;r4^;rVVEFKwrxWpP9dVPpKVPV,p VP^4pVPR4p
\ V
4F<>wr<>V P R4p V 'd<>VP VPWb4V VPV 4VPV 4VPV 4R7VPPV 4wr<>Wn, p\WV4pV\V 4, p\WC4pV PR4'gK<>^p^pV^, pK<> EKN WPnW@nW nR#)z)
Create drawables for the token content.
T<EFBFBD>
rN)r~<00>parent<6E>
expandtabsrM<00> enumerate<74>rstriprr<>r<>r<>r<>r,r<><00>max<61>lenrir<><00> maxcharnor<6F>)r><00> tokensourcer<65><00>charnorr<>r<><00>ttype<70>valuer@rS<00>irT<00>temp<6D>
temp_widthrRs&& r!<00>_create_drawables<65> ImageFormatter._create_drawablessL<00><00>'(<28>'<27><06>'<27><16>%&<26>&<26> <0A>'<27>L<EFBFBD>E<EFBFBD><17>{<7B>{<7B>*<2A><1D> <0C> <0C><05><18>K<EFBFBD>K<EFBFBD><05>&<26>E<EFBFBD><1A>$<24>$<24>Q<EFBFBD>'<27>E<EFBFBD><19>$<24>$<24>T<EFBFBD>*<2A>E<EFBFBD>$<24>U<EFBFBD>+<2B><07><01><1B>{<7B>{<7B>4<EFBFBD>(<28><04><17><18>O<EFBFBD>O<EFBFBD><1C>*<2A>*<2A>:<3A>><3E><1C>#<23>3<>3<>E<EFBFBD>:<3A>"&<26>"6<>"6<>u<EFBFBD>"=<3D>"&<26>"9<>"9<>%<25>"@<40> $<24><16>%)<29>J<EFBFBD>J<EFBFBD>$<<3C>$<<3C>T<EFBFBD>$B<>M<EFBFBD>J<EFBFBD><1E>,<2C>J<EFBFBD>$'<27> <0A>$B<>M<EFBFBD><1A>c<EFBFBD>$<24>i<EFBFBD>'<27>F<EFBFBD> #<23>I<EFBFBD> 6<>I<EFBFBD><17>=<3D>=<3D><14>&<26>&<26>!"<22>J<EFBFBD><1E>F<EFBFBD><1A>a<EFBFBD>K<EFBFBD>F<EFBFBD>',<2C>(<28><+<2B><1A>"<22><0E><1F>r c <0C><><00>VP'gR#\VP4F?pWP,pW P,^8XgK.VP W4KA R#)z(
Create drawables for the line numbers.
N)r<><00>ranger<65>r<>r<>r)r><00>p<>ns& r!<00>_draw_line_numbers<72>!ImageFormatter._draw_line_numbersBsS<00><00><14> <20> <20> <20> <12><16>t<EFBFBD>~<7E>~<7E>&<26>A<EFBFBD><11>*<2A>*<2A>*<2A>A<EFBFBD><11>)<29>)<29>)<29>a<EFBFBD>/<2F><14>%<25>%<25>a<EFBFBD>+<2B>'r c <0C><><00>VP'gR#VPfR#\P!V4pVPR,pVP
VP ,VP,
pVPRWC3.VPR7VP'd#VPV^3WC3.VPR7?R#)z0
Paint the line number background on the image.
N<EFBFBD>r<><00><><EFBFBD><EFBFBD><EFBFBD>)<02>r() r<>r<>r<00>Draw<61>sizer<65>r<>r<><00> rectangler<65>r<>rT)r><00>im<69>draw<61>recth<74>rectws&& r!<00>_paint_line_number_bg<62>$ImageFormatter._paint_line_number_bgMs<><00><00><14> <20> <20> <20> <12> <0F> <1E> <1E> &<26> <12><18>~<7E>~<7E>b<EFBFBD>!<21><04><12><07><07><02> <0B><05><14><0E><0E><14>!7<>!7<>7<>$<24>:N<>:N<>N<><05> <0C><0E><0E><06><15><0E>/<2F> <20>/<2F>/<2F> <17> 1<> <0F> %<25> %<25> %<25> <10>I<EFBFBD>I<EFBFBD><05>q<EFBFBD>z<EFBFBD>E<EFBFBD>><3E>2<><14>9L<39>9L<39>I<EFBFBD> M<> r c  <0C><><00>VPV4VP4\P!RVP VP
VP 4VP4pVPV4\P!V4pVP'd<>VPVP,VP,
^,pVP4pVP ^,V,
pVPFIpVP#V^,
4p VP%WY3WW,W<>,3.VP&R7KK VP(F<>wr<>r<EFBFBD>pV'd<>\+VR4'dVP-W<>R7pMV P/V 4R,pVP%V
^,V
^,V
^,V^,,V
^,V^,,.VR7VP1W<>W<EFBFBD>R7K<> VP3W P4P744R#)z<>
Format ``tokensource``, an iterable of ``(tokentype, tokenstring)``
tuples and write it into ``outfile``.
This implementation calculates where it should draw each token on the
pixmap, then calculates the required pixmap size and draws the items.
<EFBFBD>RGBr&<00>textsize)r<>r?:r<>NN)r?r<>N)rr#r<00>newr<77>r<>r<>r<>r0rr)r<>r<>r<>r<>r<>r*r<>r+r<>r<>r/r4r<>r<><00>saver<65><00>upper)r>r<00>outfiler,r-<00>xr.r/<00>
linenumber<EFBFBD>yr rr?rr<00> text_sizes&&& r!rx<00>ImageFormatter.format^s<><00><00> <0A><1E><1E>{<7B>+<2B> <0C><1F><1F>!<21> <12>Y<EFBFBD>Y<EFBFBD> <11> <10> <20> <20><14>!3<>!3<>T<EFBFBD>^<5E>^<5E> D<> <10> !<21> !<21>
<EFBFBD><02>
<0A>"<22>"<22>2<EFBFBD>&<26><18>~<7E>~<7E>b<EFBFBD>!<21><04> <0F>=<3D>=<3D>=<3D><14><0E><0E><14>!7<>!7<>7<>$<24>:N<>:N<>N<>QR<51>R<>A<EFBFBD><18>)<29>)<29>+<2B>E<EFBFBD><16>G<EFBFBD>G<EFBFBD>A<EFBFBD>J<EFBFBD><11>N<EFBFBD>E<EFBFBD>"<22>m<EFBFBD>m<EFBFBD>
<EFBFBD><18>$<24>$<24>Z<EFBFBD>!<21>^<5E>4<><01><14><0E><0E><11><06><11><19>A<EFBFBD>I<EFBFBD>(><3E>?<3F>$(<28>M<EFBFBD>M<EFBFBD><1F>3<>,<2C>37<33>.<2E>.<2E> .<2E>C<EFBFBD><04>w<EFBFBD><16><1A>4<EFBFBD><1A>,<2C>,<2C> $<24> <0A> <0A>5<EFBFBD> <0A> D<>I<EFBFBD> $<24> <0C> <0C>U<EFBFBD> 3<>B<EFBFBD> 7<>I<EFBFBD><14><0E><0E><03>A<EFBFBD><06><03>A<EFBFBD><06><03>A<EFBFBD><06><19>1<EFBFBD><1C>0E<30>s<EFBFBD>1<EFBFBD>v<EFBFBD>PY<50>Z[<5B>P\<5C>G\<5C>]<5D>dk<64><0E>l<> <10>I<EFBFBD>I<EFBFBD>c<EFBFBD>t<EFBFBD>I<EFBFBD> :<3A>3A<01> <0B><07><07><07>*<2A>*<2A>0<>0<>2<>3r )r<>r<>r-r<>r,r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>rr<>r<>r~N)r<><00>IMGr<47>)rw)rrrrrrP<00>aliases<65> filenames<65> unicodeoutputr<74>rAr<>r<>r<>r<>r<>r<>r<>r<>r<>r<>r<>rrrr#r0rxrr<>r<>s@r!r
r
s<><00><><00><00>l<08>^ <11>D<EFBFBD>#<23>G<EFBFBD><18> <09>I<EFBFBD><19>M<EFBFBD> <20><18>6<1C>pR<01>*<2A> A<01> <1A> D<01> F<01> :<3A> <14><18>C<01> B<01> 
<EFBFBD>C<01> & <20>P ,<2C><11>"#4<>#4r c<00>.<00>]tRtRtRtRtR.tR.tRtRt R#)r i<>z<>
Create a GIF image from source code. This uses the Python Imaging Library to
generate a pixmap from the source code.
.. versionadded:: 1.0
<EFBFBD>img_gifr<66>z*.gifrN<>
rrrrrrPr?r@r<>rrr r!r r <00>s"<00><00><08> <15>D<EFBFBD><14>g<EFBFBD>G<EFBFBD><18> <09>I<EFBFBD> <20>r c<00>0<00>]tRtRtRtRtRR.tR.tRtRt R#) r i<>z<>
Create a JPEG image from source code. This uses the Python Imaging Library to
generate a pixmap from the source code.
.. versionadded:: 1.0
<EFBFBD>img_jpg<70>jpgr<67>z*.jpgrNrDrr r!r r <00>s$<00><00><08> <15>D<EFBFBD><14>f<EFBFBD>o<EFBFBD>G<EFBFBD><18> <09>I<EFBFBD>!<21>r c<00>0<00>]tRtRtRtRtRR.tR.tRtRt R#) r i<>z<>
Create a bitmap image from source code. This uses the Python Imaging Library to
generate a pixmap from the source code.
.. versionadded:: 1.0
<EFBFBD>img_bmpr<70><00>bitmapz*.bmprNrDrr r!r r <00>s%<00><00><08> <15>D<EFBFBD><14>h<EFBFBD><1F>G<EFBFBD><18> <09>I<EFBFBD> <20>r )r
r r r )rw<00>Roman<61>Book<6F>Normal<61>Regular<61>Medium) rr0r5<00>pygments.formatterr<00> pygments.utilrrrrrH<00>PILrrr r<><00> ImportErrorry<00>winreg<65>__all__r4r<r8r:r<00> Exceptionr#r%r
r r r rr r!<00><module>rWs<00><01><04>
<EFBFBD>
<EFBFBD>(<28><13><13><12><1A>/<2F>/<2F><18>M<EFBFBD><17><12> <20><07>  <0A>F<> <0C>9<EFBFBD>h<EFBFBD>'<27>
<EFBFBD>6<EFBFBD>(<28><10>><3E>=<3D>1<> 
<02><06>+<2B><15>%<25><15><1F><15>7<>k<EFBFBD>7<>3<>9<EFBFBD>3<>O<14>O<14>ds4<>Y<EFBFBD>s4<>r !<21><0E> !<21> "<22><0E> "<22> !<21><0E> !<21><>Y<13><1A><19>M<EFBFBD><1A><>
<13><17><17> <20><> <16><17><16><07><17><><17>s:<00> B<00>B+<00> B(<03>'B(<03>+C
<03>3B9<02>9 C<05>C
<03>C<05>C