/usr/lib/python2.6/site-packages/tablib/packages/xlwt3
NameSizeModeActions
antlr.py869970644editdlrm
BIFFRecords.py948770644editdlrm
BIFFRecords.pyc1129610644editdlrm
Bitmap.py106390644editdlrm
Bitmap.pyc77370644editdlrm
Cell.py83670644editdlrm
Cell.pyc79680644editdlrm
Column.py10460644editdlrm
Column.pyc18010644editdlrm
CompoundDoc.py195480644editdlrm
CompoundDoc.pyc138160644editdlrm
ExcelFormula.py13910644editdlrm
ExcelFormula.pyc23820644editdlrm
ExcelFormulaLexer.py43110644editdlrm
ExcelFormulaLexer.pyc48690644editdlrm
ExcelFormulaParser.py228120644editdlrm
ExcelFormulaParser.pyc156460644editdlrm
ExcelMagic.py296680644editdlrm
ExcelMagic.pyc296980644editdlrm
Formatting.py86160755editdlrm
Formatting.pyc89810644editdlrm
Row.py101110644editdlrm
Row.pyc107610644editdlrm
Style.py197050644editdlrm
Style.pyc169070644editdlrm
UnicodeUtils.py34080644editdlrm
UnicodeUtils.pyc34600644editdlrm
Utils.py66630644editdlrm
Utils.pyc55070644editdlrm
Workbook.py211320644editdlrm
Workbook.pyc263450644editdlrm
Worksheet.py439580644editdlrm
Worksheet.pyc496460644editdlrm
__init__.py2660644editdlrm
__init__.pyc5980644editdlrm
Edit: /usr/lib/python2.6/site-packages/tablib/packages/xlwt3/Bitmap.pyc (7737B)
Ñò }DVc@snddklZddkTd„Zd„Zd„Zdefd„ƒYZd „Zd efd „ƒYZd S( i(t BiffRecordiÿÿÿÿ(t*cCs |i|ƒS(N(t col_width(tsheettcol((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/xlwt3/Bitmap.pyt _size_col scCs |i|ƒS(N(t row_height(Rtrow((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/xlwt3/Bitmap.pyt _size_row sc 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/xlwt3/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/xlwt3/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/xlwt3/Bitmap.pyR?ös  ! (R@RARBR?(((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/xlwt3/Bitmap.pyRSósN( t BIFFRecordsRtstructRRRRRRRS(((s</tmp/pip-build-lt8jXN/tablib/tablib/packages/xlwt3/Bitmap.pyts    XQ 9