Re: Get Tk::Canvas pixels
"John" <[email protected]>
| Newsgroups | gmane.comp.lang.perl.tk |
|---|---|
| Message-ID | <005c01c4d6b0$c415fce0$747882c3@jonsof> |
----- Original Message ----- From: <[email protected]> To: "John" <[email protected]> Cc: <[email protected]> Sent: Monday, November 29, 2004 6:57 PM Subject: Re: Get Tk::Canvas pixels > "John" <[email protected]> wrote: > > I tried to generate a postscript file but canvas doen;t keep the encoding. > > > > I write greek in the canvas and then cannot be read in the ps file. > > > > Any ideas on how to maintain the encoding (iso-8859-7) > > > > > > The encoding is hardcoded in the file Tk/prolog.ps. There's a section > called ISOLatin1Encoding which probably should be replaced by a > similar block with a iso-8859-7 encoding. Or make a upgrade to Tk804 > (that is, the current ActivePerl), as this should handle all > encodings out of the box... > > Regards, > Slaven > > > ----- Original Message ----- > > From: <[email protected]> > > To: "John" <[email protected]> > > Cc: <[email protected]> > > Sent: Monday, November 29, 2004 3:08 PM > > Subject: Re: Get Tk::Canvas pixels > > > > > > > "John" <[email protected]> wrote: > > > > Well, i use Active perl 5.6.1 so there is not any Tk::WinPhoto > > installed, > > > > and there is not in the activestates repositories either. > > > > > > > > So, i would like to know how can this be done using Tk::Photo > > > > > > > > > > Ah, yes, that's correct. WinPhoto is not implemented on Win32, so you're > > > out of luck. > > > > > > Regards, > > > Slaven > > > > > > -- > > > __o Slaven Rezic > > > _`\<,_ slaven <at> rezic <dot> de > > > __(_)/ (_)____ > > > > > ____________________________________________________________________________ > > __ > > > -++**==--++**==--++**==--++**==--++**==--++**==--++**== > > > This message was posted through the Stanford campus mailing list > > > server. If you wish to unsubscribe from this mailing list, send the > > > message body of "unsubscribe ptk" to [email protected] > > > > > > > > > -++**==--++**==--++**==--++**==--++**==--++**==--++**== > > This message was posted through the Stanford campus mailing list > > server. If you wish to unsubscribe from this mailing list, send the > > message body of "unsubscribe ptk" to [email protected] > > > -- > __o Slaven Rezic > _`\<,_ slaven <at> rezic <dot> de > __(_)/ (_)____ > ____________________________________________________________________________ __ > -++**==--++**==--++**==--++**==--++**==--++**==--++**== > This message was posted through the Stanford campus mailing list > server. If you wish to unsubscribe from this mailing list, send the > message body of "unsubscribe ptk" to [email protected] > Here is the block you mentioned ---------------------------------------------------------------------------- -------- % Define the array ISOLatin1Encoding (which specifies how characters are % encoded for ISO-8859-1 fonts), if it isn't already present (Postscript % level 2 is supposed to define it, but level 1 doesn't). systemdict /ISOLatin1Encoding known not { /ISOLatin1Encoding [ /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /space /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /space /ring /cedilla /space /hungarumlaut /ogonek /caron /space /exclamdown /cent /sterling /currency /yen /brokenbar /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree /plusminus /twosuperior /threesuperior /acute /mu /paragraph /periodcentered /cedillar /onesuperior /ordmasculine /guillemotright /onequarter /onehalf /threequarters /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide /oslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis ] def } if % font ISOEncode font % This procedure changes the encoding of a font from the default % Postscript encoding to ISOLatin1. It's typically invoked just % before invoking "setfont". The body of this procedure comes from % Section 5.6.1 of the Postscript book. /ISOEncode { dup length dict begin {1 index /FID ne {def} {pop pop} ifelse} forall /Encoding ISOLatin1Encoding def currentdict end % I'm not sure why it's necessary to use "definefont" on this new % font, but it seems to be important; just use the name "Temporary" % for the font. /Temporary exch definefont } bind def --------------------------------------------------------------------- Now what should i change and where exactly? -++**==--++**==--++**==--++**==--++**==--++**==--++**== This message was posted through the Stanford campus mailing list server. If you wish to unsubscribe from this mailing list, send the message body of "unsubscribe ptk" to [email protected]