canvastools.cxx (9f62ea84) canvastools.cxx (87bc88d3)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 235 unchanged lines hidden (view full) ---

244 // read ARGB color
245 aARGBColors = rLayout.ColorSpace->convertIntegerToARGB(aPixelData);
246
247 if( rWriteAcc->HasPalette() )
248 {
249 for( sal_Int32 x=0; x<nWidth; ++x )
250 {
251 const rendering::ARGBColor& rColor=aARGBColors[x];
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 235 unchanged lines hidden (view full) ---

244 // read ARGB color
245 aARGBColors = rLayout.ColorSpace->convertIntegerToARGB(aPixelData);
246
247 if( rWriteAcc->HasPalette() )
248 {
249 for( sal_Int32 x=0; x<nWidth; ++x )
250 {
251 const rendering::ARGBColor& rColor=aARGBColors[x];
252 rWriteAcc->SetPixel( aRect.Y1, x,
253 (sal_uInt8)rWriteAcc->GetBestPaletteIndex(
252 rWriteAcc->SetPixelIndex( aRect.Y1, x,
253 (sal_uInt8) rWriteAcc->GetBestPaletteIndex(
254 BitmapColor( toByteColor(rColor.Red),
255 toByteColor(rColor.Green),
256 toByteColor(rColor.Blue))) );
257 rAlphaAcc->SetPixel( aRect.Y1, x,
258 BitmapColor( 255 - toByteColor(rColor.Alpha) ));
259 }
260 }
261 else

--- 14 unchanged lines hidden (view full) ---

276 {
277 // read RGB color
278 aRGBColors = rLayout.ColorSpace->convertIntegerToRGB(aPixelData);
279 if( rWriteAcc->HasPalette() )
280 {
281 for( sal_Int32 x=0; x<nWidth; ++x )
282 {
283 const rendering::RGBColor& rColor=aRGBColors[x];
254 BitmapColor( toByteColor(rColor.Red),
255 toByteColor(rColor.Green),
256 toByteColor(rColor.Blue))) );
257 rAlphaAcc->SetPixel( aRect.Y1, x,
258 BitmapColor( 255 - toByteColor(rColor.Alpha) ));
259 }
260 }
261 else

--- 14 unchanged lines hidden (view full) ---

276 {
277 // read RGB color
278 aRGBColors = rLayout.ColorSpace->convertIntegerToRGB(aPixelData);
279 if( rWriteAcc->HasPalette() )
280 {
281 for( sal_Int32 x=0; x<nWidth; ++x )
282 {
283 const rendering::RGBColor& rColor=aRGBColors[x];
284 rWriteAcc->SetPixel( aRect.Y1, x,
285 (sal_uInt8)rWriteAcc->GetBestPaletteIndex(
284 rWriteAcc->SetPixelIndex( aRect.Y1, x,
285 (sal_uInt8) rWriteAcc->GetBestPaletteIndex(
286 BitmapColor( toByteColor(rColor.Red),
287 toByteColor(rColor.Green),
288 toByteColor(rColor.Blue))) );
289 }
290 }
291 else
292 {
293 for( sal_Int32 x=0; x<nWidth; ++x )

--- 540 unchanged lines hidden ---
286 BitmapColor( toByteColor(rColor.Red),
287 toByteColor(rColor.Green),
288 toByteColor(rColor.Blue))) );
289 }
290 }
291 else
292 {
293 for( sal_Int32 x=0; x<nWidth; ++x )

--- 540 unchanged lines hidden ---