/usr/lib/python2.6/site-packages/tablib/packages/xlwt
NameSizeModeActions
antlr.py842010644editdlrm
antlr.pyc1004180644editdlrm
BIFFRecords.py946220644editdlrm
BIFFRecords.pyc1126670644editdlrm
Bitmap.py104130644editdlrm
Bitmap.pyc77230644editdlrm
Cell.py85260644editdlrm
Cell.pyc79210644editdlrm
Column.py10110644editdlrm
Column.pyc17950644editdlrm
CompoundDoc.py190850644editdlrm
CompoundDoc.pyc136950644editdlrm
ExcelFormula.py13850644editdlrm
ExcelFormula.pyc23570644editdlrm
ExcelFormulaLexer.py42050644editdlrm
ExcelFormulaLexer.pyc48390644editdlrm
ExcelFormulaParser.py223620644editdlrm
ExcelFormulaParser.pyc157160644editdlrm
ExcelMagic.py288400644editdlrm
ExcelMagic.pyc301390644editdlrm
Formatting.py83470755editdlrm
Formatting.pyc89450644editdlrm
Row.py98540644editdlrm
Row.pyc107060644editdlrm
Style.py190220644editdlrm
Style.pyc167860644editdlrm
UnicodeUtils.py33780644editdlrm
UnicodeUtils.pyc34620644editdlrm
Utils.py64740644editdlrm
Utils.pyc54940644editdlrm
Workbook.py205140644editdlrm
Workbook.pyc261670644editdlrm
Worksheet.py425960644editdlrm
Worksheet.pyc493920644editdlrm
__init__.py3050644editdlrm
__init__.pyc6260644editdlrm
Edit: /usr/lib/python2.6/site-packages/tablib/packages/xlwt/Bitmap.pyc (7723B)
Ñò }DVc@snddklZddkTd„Zd„Zd„Zdefd„ƒYZd„Zd efd „ƒYZd S( iÿÿÿÿ(t BiffRecord(t*cCs |i|ƒS(N(t col_width(tsheettcol((s;/tmp/pip-build-lt8jXN/tablib/tablib/packages/xlwt/Bitmap.pyt _size_col scCs |i|ƒS(N(t row_height(Rtrow((s;/tmp/pip-build-lt8jXN/tablib/tablib/packages/xlwt/Bitmap.pyt _size_rowsc Csx8|t||ƒjo!|t||ƒ8}|d7}qWx8|t||ƒjo!|t||ƒ8}|d7}q>W|}|}||d}||d}x8|t||ƒjo!|t||ƒ8}|d7}q¡Wx8|t||ƒjo!|t||ƒ8}|d7}qÜWt||ƒdjpBt||ƒdjp,t||ƒdjpt||ƒdjodStt|ƒt||ƒdƒ}tt|ƒt||ƒdƒ}tt|ƒt||ƒdƒ} tt|ƒt||ƒdƒ} |||||| || fS(súCalculate the vertices that define the position of the image as required by the OBJ record. +------------+------------+ | A | B | +-----+------------+------------+ | |(x1,y1) | | | 1 |(A1)._______|______ | | | | | | | | | | | +-----+----| BITMAP |-----+ | | | | | | 2 | |______________. | | | | (B2)| | | | (x2,y2)| +---- +------------+------------+ Example of a bitmap that covers some of the area from cell A1 to cell B2. Based on the width and height of the bitmap we need to calculate 8 vars: col_start, row_start, col_end, row_end, x1, y1, x2, y2. The width and height of the cells are also variable and have to be taken into account. The values of col_start and row_start are passed in from the calling function. The values of col_end and row_end are calculated by subtracting the width and height of the bitmap from the width and height of the underlying cells. The vertices are expressed as a percentage of the underlying cell width as follows (rhs values are in pixels): x1 = X / W *1024 y1 = Y / H *256 x2 = (X-1) / W *1024 y2 = (Y-1) / H *256 Where: X is distance from the left side of the underlying cell Y is distance from the top of the underlying cell W is the width of the cell H is the height of the cell Note: the SDK incorrectly states that the height should be expressed as a percentage of 1024. col_start - Col containing upper left corner of object row_start - Row containing top left corner of object x1 - Distance to left side of object y1 - Distance to top of object width - Width of image frame height - Height of image frame iiNii(RRtinttfloat( Rt row_startt col_starttx1ty1twidththeighttrow_endtcol_endtx2ty2((s;/tmp/pip-build-lt8jXN/tablib/tablib/packages/xlwt/Bitmap.pyt_position_images85,,####t ObjBmpRecordcBseZdZd„ZRS(i]c 3CsM|i|} |i|} t|||||| | ƒ} | \} } }}}}}}d}d}d}d}| }| }|}|}|}|}|}|}d} d}!d}"d}#d}$d}%d}&d}'d}(d})d}*d}+d},d}-d}.d}/d}0d}1td|ƒ}2|2td|ƒ7}2|2td|ƒ7}2|2td|ƒ7}2|2td|ƒ7}2|2td|ƒ7}2|2td|ƒ7}2|2td|ƒ7}2|2td|ƒ7}2|2td|ƒ7}2|2td|ƒ7}2|2td|ƒ7}2|2td| ƒ7}2|2td|!ƒ7}2|2td|"ƒ7}2|2td |#ƒ7}2|2td |$ƒ7}2|2td |%ƒ7}2|2td |&ƒ7}2|2td |'ƒ7}2|2td |(ƒ7}2|2td |)ƒ7}2|2td |*ƒ7}2|2td|+ƒ7}2|2td|,ƒ7}2|2td|-ƒ7}2|2td|.ƒ7}2|2td|/ƒ7}2|2td|0ƒ7}2|2td|1ƒ7}2|2|_dS( Niiiii iÿstsizeRRtplanestbitcountt compressiontheader((s;/tmp/pip-build-lt8jXN/tablib/tablib/packages/xlwt/Bitmap.pyt_process_bitmap¼sD                tImDataBmpRecordcBseZdZd„ZRS(icCscti|ƒt|ƒ\|_|_|_}d}d}|i}td|||ƒ||_dS(s¡Insert a 24bit bitmap image in a worksheet. The main record required is IMDATA but it must be proceeded by a OBJ record to define its position. i isR8tenvtlcb((s;/tmp/pip-build-lt8jXN/tablib/tablib/packages/xlwt/Bitmap.pyR?øs  ! (R@RARBR?(((s;/tmp/pip-build-lt8jXN/tablib/tablib/packages/xlwt/Bitmap.pyRSõsN( t BIFFRecordsRtstructRRRRRRRS(((s;/tmp/pip-build-lt8jXN/tablib/tablib/packages/xlwt/Bitmap.pyts    XQ 9