Lines Matching refs:rDesc

47 void CGMBitmap::ImplGetBitmap( CGMBitmapDescriptor& rDesc )  in ImplGetBitmap()  argument
49 rDesc.mbStatus = sal_True; in ImplGetBitmap()
52 if ( ImplGetDimensions( rDesc ) && rDesc.mpBuf ) in ImplGetBitmap()
54 …if ( ( rDesc.mpBitmap = new Bitmap( Size( rDesc.mnX, rDesc.mnY ), (sal_uInt16)rDesc.mnDstBitsPerPi… in ImplGetBitmap()
56 if ( ( rDesc.mpAcc = rDesc.mpBitmap->AcquireWriteAccess() ) != NULL ) in ImplGetBitmap()
61 nxCount = rDesc.mnX + 1; // +1 because we are using prefix decreasing in ImplGetBitmap()
62 nyCount = rDesc.mnY + 1; in ImplGetBitmap()
64 switch ( rDesc.mnDstBitsPerPixel ) in ImplGetBitmap()
68 if ( rDesc.mnLocalColorPrecision == 1 ) in ImplGetBitmap()
69 ImplSetCurrentPalette( rDesc ); in ImplGetBitmap()
72 rDesc.mpAcc->SetPaletteEntryCount( 2 ); in ImplGetBitmap()
73 rDesc.mpAcc->SetPaletteColor( 0, BMCOL( mpCGM->pElement->nBackGroundColor ) ); in ImplGetBitmap()
74 rDesc.mpAcc->SetPaletteColor( 1, in ImplGetBitmap()
79 for ( ny = 0; --nyCount ; ny++, rDesc.mpBuf += rDesc.mnScanSize ) in ImplGetBitmap()
84rDesc.mpAcc->SetPixelIndex( ny, nx, static_cast<sal_uInt8>( (*( rDesc.mpBuf + (nx >> 3)) >> ((nx &… in ImplGetBitmap()
92 ImplSetCurrentPalette( rDesc ); in ImplGetBitmap()
93 for ( ny = 0; --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize ) in ImplGetBitmap()
98rDesc.mpAcc->SetPixelIndex( ny, nx, static_cast<sal_uInt8>( (*(rDesc.mpBuf + (nx >> 2)) >> (((nx &… in ImplGetBitmap()
106 ImplSetCurrentPalette( rDesc ); in ImplGetBitmap()
107 for ( ny = 0; --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize ) in ImplGetBitmap()
111 sal_uInt8* pTemp = rDesc.mpBuf; in ImplGetBitmap()
115 rDesc.mpAcc->SetPixelIndex( ny, nx, static_cast<sal_uInt8>(nDat >> 4) ); in ImplGetBitmap()
119 rDesc.mpAcc->SetPixelIndex( ny, nx, static_cast<sal_uInt8>(nDat & 15) ); in ImplGetBitmap()
130 ImplSetCurrentPalette( rDesc ); in ImplGetBitmap()
131 for ( ny = 0; --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize ) in ImplGetBitmap()
133 sal_uInt8* pTemp = rDesc.mpBuf; in ImplGetBitmap()
137 rDesc.mpAcc->SetPixelIndex( ny, nx, *(pTemp++) ); in ImplGetBitmap()
147 for ( ny = 0; --nyCount; ny++, rDesc.mpBuf += rDesc.mnScanSize ) in ImplGetBitmap()
149 sal_uInt8* pTemp = rDesc.mpBuf; in ImplGetBitmap()
156 rDesc.mpAcc->SetPixel( ny, nx, aBitmapColor ); in ImplGetBitmap()
163 double nX = rDesc.mnR.X - rDesc.mnQ.X; in ImplGetBitmap()
164 double nY = rDesc.mnR.Y - rDesc.mnQ.Y; in ImplGetBitmap()
166 rDesc.mndy = sqrt( nX * nX + nY * nY ); in ImplGetBitmap()
168 nX = rDesc.mnR.X - rDesc.mnP.X; in ImplGetBitmap()
169 nY = rDesc.mnR.Y - rDesc.mnP.Y; in ImplGetBitmap()
171 rDesc.mndx = sqrt( nX * nX + nY * nY ); in ImplGetBitmap()
173 nX = rDesc.mnR.X - rDesc.mnP.X; in ImplGetBitmap()
174 nY = rDesc.mnR.Y - rDesc.mnP.Y; in ImplGetBitmap()
176 rDesc.mnOrientation = acos( nX / sqrt( nX * nX + nY * nY ) ) * 57.29577951308; in ImplGetBitmap()
178 rDesc.mnOrientation = 360 - rDesc.mnOrientation; in ImplGetBitmap()
180 nX = rDesc.mnQ.X - rDesc.mnR.X; in ImplGetBitmap()
181 nY = rDesc.mnQ.Y - rDesc.mnR.Y; in ImplGetBitmap()
183 double fAngle = 0.01745329251994 * ( 360 - rDesc.mnOrientation ); in ImplGetBitmap()
195 rDesc.mnOrigin = rDesc.mnP; in ImplGetBitmap()
199 rDesc.mbVMirror = sal_True; in ImplGetBitmap()
200 rDesc.mnOrigin = rDesc.mnP; in ImplGetBitmap()
201 rDesc.mnOrigin.X += rDesc.mnQ.X - rDesc.mnR.X; in ImplGetBitmap()
202 rDesc.mnOrigin.Y += rDesc.mnQ.Y - rDesc.mnR.Y; in ImplGetBitmap()
206 rDesc.mbStatus = sal_False; in ImplGetBitmap()
209 rDesc.mbStatus = sal_False; in ImplGetBitmap()
212 rDesc.mbStatus = sal_False; in ImplGetBitmap()
214 if ( rDesc.mpAcc ) in ImplGetBitmap()
216 rDesc.mpBitmap->ReleaseAccess( rDesc.mpAcc ); in ImplGetBitmap()
217 rDesc.mpAcc = NULL; in ImplGetBitmap()
219 if ( rDesc.mbStatus == sal_False ) in ImplGetBitmap()
221 if ( rDesc.mpBitmap ) in ImplGetBitmap()
223 delete rDesc.mpBitmap; in ImplGetBitmap()
224 rDesc.mpBitmap = NULL; in ImplGetBitmap()
231 void CGMBitmap::ImplSetCurrentPalette( CGMBitmapDescriptor& rDesc ) in ImplSetCurrentPalette() argument
234 1 << rDesc.mnDstBitsPerPixel); in ImplSetCurrentPalette()
235 rDesc.mpAcc->SetPaletteEntryCount( nColors ); in ImplSetCurrentPalette()
238 rDesc.mpAcc->SetPaletteColor( i, BMCOL( mpCGM->pElement->aLatestColorTable[ i ] ) ); in ImplSetCurrentPalette()
244 sal_Bool CGMBitmap::ImplGetDimensions( CGMBitmapDescriptor& rDesc ) in ImplGetDimensions() argument
246 mpCGM->ImplGetPoint( rDesc.mnP ); // parallelogram p < - > r in ImplGetDimensions()
247 mpCGM->ImplGetPoint( rDesc.mnQ ); // | in ImplGetDimensions()
248 mpCGM->ImplGetPoint( rDesc.mnR ); // q in ImplGetDimensions()
250 rDesc.mnX = mpCGM->ImplGetUI( nPrecision ); in ImplGetDimensions()
251 rDesc.mnY = mpCGM->ImplGetUI( nPrecision ); in ImplGetDimensions()
252 rDesc.mnLocalColorPrecision = mpCGM->ImplGetI( nPrecision ); in ImplGetDimensions()
253 rDesc.mnScanSize = 0; in ImplGetDimensions()
254 switch( rDesc.mnLocalColorPrecision ) in ImplGetDimensions()
258 rDesc.mnDstBitsPerPixel = 1; in ImplGetDimensions()
262 rDesc.mnDstBitsPerPixel = 1; in ImplGetDimensions()
266 rDesc.mnDstBitsPerPixel = 2; in ImplGetDimensions()
270 rDesc.mnDstBitsPerPixel = 4; in ImplGetDimensions()
274 rDesc.mnDstBitsPerPixel = 8; in ImplGetDimensions()
275 rDesc.mnScanSize = rDesc.mnX; in ImplGetDimensions()
279 rDesc.mbStatus = sal_False; in ImplGetDimensions()
283 rDesc.mnDstBitsPerPixel = 24; in ImplGetDimensions()
287 rDesc.mbStatus = sal_False; in ImplGetDimensions()
293 if ( ( rDesc.mnCompressionMode = mpCGM->ImplGetUI16() ) != 1 ) in ImplGetDimensions()
294 rDesc.mbStatus = sal_False; in ImplGetDimensions()
296 if ( ( rDesc.mnX || rDesc.mnY ) == 0 ) in ImplGetDimensions()
297 rDesc.mbStatus = sal_False; in ImplGetDimensions()
300 rDesc.mnScanSize = ( ( rDesc.mnX * rDesc.mnDstBitsPerPixel + 7 ) >> 3 ); in ImplGetDimensions()
303 nScanSize = rDesc.mnScanSize; in ImplGetDimensions()
304 …if ( ( nScanSize * rDesc.mnY + nHeaderSize ) != mpCGM->mnElementSize ) // try a scansize without d… in ImplGetDimensions()
306 nScanSize = ( rDesc.mnScanSize + 1 ) & ~1; in ImplGetDimensions()
307 …if ( ( nScanSize * rDesc.mnY + nHeaderSize ) != mpCGM->mnElementSize ) // then we'll try word alig… in ImplGetDimensions()
309 nScanSize = ( rDesc.mnScanSize + 3 ) & ~3; in ImplGetDimensions()
310 …if ( ( nScanSize * rDesc.mnY + nHeaderSize ) != mpCGM->mnElementSize ) // and last we'll try dword… in ImplGetDimensions()
312 …nScanSize = ( rDesc.mnScanSize + 1 ) & ~1; // and LAST BUT NOT LEAST we'll try word alignment wi… in ImplGetDimensions()
313 … if ( ( nScanSize * ( rDesc.mnY - 1 ) + rDesc.mnScanSize + nHeaderSize ) != mpCGM->mnElementSize ) in ImplGetDimensions()
315 nScanSize = ( rDesc.mnScanSize + 3 ) & ~3; in ImplGetDimensions()
316 … if ( ( nScanSize * ( rDesc.mnY - 1 ) + rDesc.mnScanSize + nHeaderSize ) != mpCGM->mnElementSize ) in ImplGetDimensions()
319 rDesc.mbStatus = sal_False; in ImplGetDimensions()
325 rDesc.mnScanSize = nScanSize; in ImplGetDimensions()
326 if ( rDesc.mbStatus ) in ImplGetDimensions()
328 rDesc.mpBuf = mpCGM->mpSource + mpCGM->mnParaSize; // mpBuf now points to the first scanline in ImplGetDimensions()
329 mpCGM->mnParaSize += rDesc.mnScanSize * rDesc.mnY; in ImplGetDimensions()
331 return rDesc.mbStatus; in ImplGetDimensions()