Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
3
Nebv ã @ s d Z dZddlmZ ddlT ddlT ddlmZmZm Z m
Z
mZmZm
Z
mZ ddlmZ ddlmZ ddlZdd lmZmZmZ edd
ddd
ddddddddddddddddddd d!d"d#d$d%ƒZd&ZG d'd(„ d(eƒZG d)d*„ d*eƒZd+d,„ Zd-d.„ Zed/k�reƒ dS )0z3.3.0a This file is a collection of flag graphics as widgets.
All flags are represented at the ratio of 1:2, even where the official ratio for the flag is something else
(such as 3:5 for the German national flag). The only exceptions are for where this would look _very_ wrong,
such as the Danish flag whose (ratio is 28:37), or the Swiss flag (which is square).
Unless otherwise stated, these flags are all the 'national flags' of the countries, rather than their
state flags, naval flags, ensigns or any other variants. (National flags are the flag flown by civilians
of a country and the ones usually used to represent a country abroad. State flags are the variants used by
the government and by diplomatic missions overseas).
To check on how close these are to the 'official' representations of flags, check the World Flag Database at
http://www.flags.ndirect.co.uk/
The flags this file contains are:
EU Members:
United Kingdom, Austria, Belgium, Denmark, Finland, France, Germany, Greece, Ireland, Italy, Luxembourg,
Holland (The Netherlands), Spain, Sweden
Others:
USA, Czech Republic, European Union, Switzerland, Turkey, Brazil
(Brazilian flag contributed by Publio da Costa Melo [publio@planetarium.com.br]).
é )Úcolors)Ú*)ÚLineÚRectÚPolygonÚDrawingÚGroupÚStringÚCircleÚWedge)Ú renderPDF)Ú_SymbolN)ÚsinÚcosÚpiÚUKÚUSAÚAfghanistanÚAustriaÚBelgiumZChinaÚCubaÚDenmarkÚFinlandÚFranceÚGermanyÚGreeceÚIrelandÚItalyZJapanÚ
LuxembourgÚHollandÚ PalestineÚPortugalZRussiaÚSpainÚSwedenÚNorwayÚ
CzechRepublicÚTurkeyÚSwitzerlandÚEUÚBrazilg Y@c @ s@ e Zd ZdZeeeedd�d�ZdZ dd„ Z
dd „ Zd
d„ ZdS )
ÚStarzyThis draws a 5-pointed star.
possible attributes:
'x', 'y', 'size', 'fillColor', 'strokeColor'
zangle in degrees)Údesc)ÚBASEÚangleg Y@c C s( t j| ƒ d| _tj| _d | _d| _d S )Néd r )r
Ú__init__Úsizer ÚyellowÚ fillColorÚstrokeColorr- )Úself© r5 úA/tmp/tmp4i9tl1d3/lib64/python/reportlab/graphics/widgets/flags.pyr/ W s
z
Star.__init__c C sd t ddƒ}tƒ }d|_d|_|j|ƒ d}|jt|j|jd |jd| |jjt j
d|d �ƒ |S )
NéÈ r. é2 r é
g @g333333ó?Úmiddle)r2 Ú
textAnchorÚfontSize)r r* ÚxÚyÚaddr r0 Ú __class__Ú__name__r Úblack)r4 ÚDÚetÚ
labelFontSizer5 r5 r6 Údemo^ s
z Star.democ C sô t | jƒ}tƒ }t | jƒd }|tdtd ƒ tdtd ƒ }g }d}xZtdƒD ]N}xH||fD ]<}|td } |j|t| ƒ ƒ |j|t| ƒ ƒ |d }qbW qTW t|| j | j
|d d�}
|j| jƒ |j
| j| j | j| j ƒ |j|
ƒ |S ) Né é g €f@é$ éZ é r8 )r2 r3 ÚstrokeWidth)Úfloatr0 r r r r ÚrangeÚappendr r2 r3 Úrotater- Úshiftr= Údxr> Údyr? )r4 ÚsÚgÚRÚrÚPr- ÚiÚradiusÚthetaÚstarr5 r5 r6 Údrawj s(
$
z Star.drawN)
rA Ú
__module__Ú__qualname__Ú__doc__ÚAttrMapr
ÚAttrMapValueZisNumberÚ_attrMapÚ_sizer/ rF r] r5 r5 r5 r6 r* K s r* c @ sR e Zd ZdZeeeedd�eedƒee dd�d�Z
i Zdd„ Zd d
„ Z
dd„ Zd
d„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd „ Zd!d"„ Zd#d$„ Zd%d&„ Zd'd(„ Zd)d*„ Zd+d,„ Zd-d.„ Zd/d0„ Z d1d2„ Z!d3d4„ Z"d5d6„ Z#d7d8„ Z$d9d:„ Z%d;d<„ Z&d=d>„ Z'd?d@„ Z(dAdB„ Z)dCdD„ Z*dEdF„ Z+dGdH„ Z,dIdJ„ Z-dKdL„ Z.dMS )NÚFlaga This is a generic flag class that all the flags in this file use as a basis.
This class basically provides edges and a tidy-up routine to hide any bits of
line that overlap the 'outside' of the flag
possible attributes:
'x', 'y', 'size', 'fillColor'
zBackground color)r+ zWhether a background is drawnz
Which flag)r, r2 ÚborderÚkindc K s2 t j| ƒ d | _d| _tj| _d| _| j|ƒ d S )Nr. é ) r
r/ rg r0 r Úwhiter2 rf Z
setProperties)r4 Úkwr5 r5 r6 r/ – s
z
Flag.__init__c C s dd„ | j d jjD ƒS )z*return a list of the things we can displayc S s g | ]}|d k r|‘qS )Nr5 )Ú.0r= r5 r5 r6 ú
s z+Flag.availableFlagNames..rg )rc ÚvalidateZ_enum)r4 r5 r5 r6 ÚavailableFlagNamesž s zFlag.availableFlagNamesc
C s2 t }tƒ }|jtdd|d |tjtjdd�ƒ |S )Nr rG )r2 r3 rL )rd r r? r r ZpurplerB )r4 rT rU r5 r5 r6 Ú
_Flag_None¢ s $zFlag._Flag_Nonec C s¬ | j }tƒ }|j|ƒ | j| j | j| j | jd }}}|jdt | | t
| dd| ƒd| t
| d|ƒd| d | j|d d�ƒ |j||ƒ |j
|t |t ƒ |S )Ng @r Ú_widthrG é Z_height)ÚwidthÚheightr2 r3 rL )r0 r r? r= rR r> rS rL Úinsertr Úgetattrr3 rQ Zscalerd )r4 ÚfrT rU r= r> ZsWr5 r5 r6 Ú_borderDraw¨ s
&8zFlag._borderDrawc C sB | j pd}| jj|ƒ}|s8t| d| ƒƒ }|jƒ | j|<