* missing include, remove some whitespaces

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26399 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Karsten Heimrich
2008-07-13 11:13:50 +00:00
parent a80e05e225
commit 0ef072a3f9
@@ -2,11 +2,11 @@
Image Cache Item. Image Cache Item.
Copyright (c) 2003 OpenBeOS. Copyright (c) 2003 OpenBeOS.
Author: Author:
Michael Pfeiffer Michael Pfeiffer
Permission is hereby granted, free of charge, to any person obtaining a copy of Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to the Software without restriction, including without limitation the rights to
@@ -35,6 +35,7 @@ THE SOFTWARE.
#include <TranslatorRoster.h> #include <TranslatorRoster.h>
#include <BitmapStream.h> #include <BitmapStream.h>
#include <Debug.h> #include <Debug.h>
#include <Message.h>
#include "Report.h" #include "Report.h"
#include "Image.h" #include "Image.h"
@@ -72,7 +73,7 @@ Image* ImageDescription::Store(PDF* pdf, int id, BBitmap* bitmap, int mask) {
fileName << id; fileName << id;
pdfFileName = fileName; pdfFileName = fileName;
pdfFileName << ".png"; pdfFileName << ".png";
bitmap->Lock(); bitmap->Lock();
w = bitmap->Bounds().IntegerWidth()+1; w = bitmap->Bounds().IntegerWidth()+1;
h = bitmap->Bounds().IntegerHeight()+1; h = bitmap->Bounds().IntegerHeight()+1;
@@ -94,9 +95,9 @@ Image* ImageDescription::Store(PDF* pdf, int id, BBitmap* bitmap, int mask) {
unlink(pdfFileName.String()); unlink(pdfFileName.String());
return NULL; return NULL;
} }
int image; int image;
image = PDF_open_image_file(pdf, "png", pdfFileName.String(), image = PDF_open_image_file(pdf, "png", pdfFileName.String(),
mask == -1 ? "" : "masked", mask == -1 ? 0 : mask); mask == -1 ? "" : "masked", mask == -1 ? 0 : mask);
#if STORE_AS_BBITMAP #if STORE_AS_BBITMAP
@@ -178,11 +179,11 @@ bool Image::Equals(BBitmap* bitmap) const {
if (bm) { if (bm) {
bm->Lock(); bm->Lock();
bitmap->Lock(); bitmap->Lock();
equals = bm->BitsLength() == bitmap->BitsLength() && equals = bm->BitsLength() == bitmap->BitsLength() &&
bm->ColorSpace() == bitmap->ColorSpace() && bm->ColorSpace() == bitmap->ColorSpace() &&
memcmp(bm->Bits(), bitmap->Bits(), bm->BitsLength()) == 0; memcmp(bm->Bits(), bitmap->Bits(), bm->BitsLength()) == 0;
bitmap->Unlock(); bitmap->Unlock();
bm->Unlock(); bm->Unlock();
delete bm; delete bm;