#include <bitmap.h>
Inheritance diagram for KernelBitmap:

Public Member Functions | |
| KernelBitmap (OILBitmap *pBitmap=NULL, BOOL Temp=FALSE) | |
| Constructor for kernel bitmaps. Attaches to the OILBitmap and increases its usage count. | |
| KernelBitmap (const KernelBitmap &) | |
| Copy constructor for kernel bitmaps. MAintains usage count on OILBitmap. | |
| KernelBitmap (UINT32, UINT32, UINT32, UINT32, BOOL Temp=FALSE) | |
| Constructor for kernel bitmaps which attaches it to a blank OILbitmap. Actually, the OILBitmap isn't really blank, it is entirely uninitialised i.e its contents will be random (including its palette if it has one). | |
| ~KernelBitmap () | |
| Destructor. Detaches any current OILBitmap. | |
| INT32 | operator== (const KernelBitmap &) |
| KernelBitmap & | operator= (const KernelBitmap &) |
| Assigns one KernelBitmap to another while maintaining usage count on OILBitmap. | |
| OILBitmap * | GetActualBitmap () const |
| BOOL | IsOK () const |
| Tell if KernelBitmap is OK. | |
| virtual BOOL | WritePalette (BaseCamelotFilter *pFilter) |
| Exports the palette out to the file using the BaseCamelotFilter supplied. This means that it is being written to a web or native file. At present, used by the code when outputting an 8bpp JPEG to squirt the palette into the record so that we can convert it back to 8bpp using the palette on loading. | |
| virtual BOOL | Convert24To8 (RGBTRIPLE *pPalette, UINT32 NumberOfPaletteEntries) |
| Converts the OILbitmap from its present 24bpp form into an 8bpp form which should closely match the one that was exported. | |
| void | PlotPixel (INT32 x, INT32 y, Pixel32bpp NewValue) |
| Plots a 32bpp pixel to a deep bitmap (16, 24, or 32bpp). | |
| void | PlotPixel (INT32 x, INT32 y, PixelGreyscale NewValue) |
| Plots an 8bpp (0..255) pixel to any type of bitmap The pixel is taken to be a greyscale, and is truncated or expanded as appropriate to fit the greyscale value into the destination bitmap pixel format. | |
| Pixel32bpp | ReadPixel32bpp (INT32 x, INT32 y, BOOL UsePalette=TRUE) const |
| reads a pixel | |
| INT32 | ReturnPaletteIndexUsed (INT32 x, INT32 y) const |
| PixelGreyscale | ReadPixelGreyscale (INT32 x, INT32 y) const |
| Reads a pixel as a greyscale intensity value (0..255). | |
| ADDR | GetBitmapBits () const |
| Helper function to get the actual bits (as in Bitmap). | |
| BitmapList * | GetParentBitmapList () |
| BOOL | IsUsedInDocument (Document *pDoc, BOOL bIncludeHidden=FALSE) |
| Finds if this bitmap is being used in a specified document or not. | |
| void | Attach (BitmapList *=NULL) |
| Adds this kernel bitmap to the specified document bitmap list. | |
| void | Detach () |
| Removes this kernel bitmap from it's current document bitmap list. | |
| UINT32 | GetWidth () const |
| Finds the width of this bitmap. | |
| UINT32 | GetHeight () const |
| Finds the height of this bitmap. | |
| UINT32 | GetBPP () |
| Finds the colour resolution of this bitmap. | |
| UINT32 | GetNumPaletteEntries () const |
| Finds the number of colours colour in this bitmap. | |
| INT32 | GetRecommendedWidth () |
| Finds the recommended width of the bitmap. | |
| INT32 | GetRecommendedHeight () |
| Finds the recommended height of the bitmap. | |
| void | SetRecommendedWidth (INT32) |
| Sets the recommended width of the bitmap. | |
| void | SetRecommendedHeight (INT32) |
| Sets the recommended height of the bitmap. | |
| BOOL | SetTransparencyIndex (INT32) |
| Finds the Transparent index colour of a bitmap if one exists. | |
| BOOL | GetTransparencyIndex (INT32 *pIndex) |
| Finds the Transparent index colour of a bitmap if one exists. | |
| BOOL | IsTransparent () |
| Determines if a bitmap is not totally opaque. | |
| BOOL | IsDefaultBitmap () |
| To find out if the bitmap is the default bitmap or not. This is used by the native/web saving code to see if the bitmap is the default one and if so save a reference to it. | |
| BOOL | HasBeenDeleted () |
| Tests whether or not the OIL bitmap attached to the kernel bitmap class has been deleted. | |
| BOOL | IsGreyscale () |
| Finds if this bitmap is greyscale or not. | |
| BOOL | IsLossy () |
| Finds if this bitmap is lossy or not. | |
| void | SetOriginalSource (BitmapSource *pFileBuffer=NULL, BaseBitmapFilter *pImportFilter=NULL) |
| Sets the original bitmap file associated with this reference. | |
| BOOL | GetOriginalSource (BitmapSource **ppFileBuffer=NULL, BaseBitmapFilter **ppImportFilter=NULL) |
| Gets the original bitmap file buffer associated with this reference. | |
| BOOL | CreateGreyscaleVersion (BOOL ForceGreyBmp=FALSE) |
| Creates a greyscale version of this bitmap. | |
| BOOL | DestroyGreyscaleVersion () |
| Destroys the greyscale version of this bitmap. | |
| OILBitmap * | GetGreyscaleVersion (BOOL ForceGreyBmp=FALSE) |
| Gets the greyscale version of this bitmap. | |
| OILBitmap * | ExtractOILBitmap () |
| Extracts the OILBitmap from this kernel bitmap AND DELETES THIS KERNEL BITMAP. | |
| void | GenerateGreyscaleTable () |
| BOOL | SetAsFractal () |
| Set this bitmap as a fractal bitmap. | |
| BOOL | SetAsGreyscale () |
| Set this bitmap as a greyscale bitmap This is used to inform the bitmap that it is a greyscale 8bpp bitmap. This is because when we create a grteyscale OILBitmap and attach a KernelBitmap to it, there is no way to indicate to the system that it's a true greyscale bitmap, which is necessary to stop it farting around and making a new copy of the bitmap when someone calls GetGreyscaleVersion(). This is used by the airbrush stroke provider when it generates a greyscale bitmap for use as a transparency mask. | |
| BOOL | SetAsLossy (BOOL bLossy=TRUE) |
| Set this bitmap' lossy flag. | |
| UINT32 | GetDelay () |
| Returns m_AnimDelay for an OilBitmap. | |
| void | SetDelay (UINT32 Delay) |
| Sets the m_AnimDelay memeber for an OilBitmap. | |
| BOOL | GetInterpolation () |
| Returns m_bInterpolation for an OilBitmap. | |
| void | SetInterpolation (BOOL bInterpolation) |
| Sets the m_bInterpolation member for an OilBitmap. | |
| void | SetAnimationRestoreType (GIFDisposalMethod Type) |
| Sets the GIF restore type for an OilBitmap. | |
| GIFDisposalMethod | GetAnimationRestoreType () const |
| Returns the GIF restore type for an OilBitmap. | |
| void | SetLeftOffset (UINT32 LeftOffset) |
| Sets the left offset for an OilBitmap. | |
| UINT32 | GetLeftOffset () const |
| Gets the left offset for an OilBitmap. | |
| void | SetTopOffset (UINT32 TopOffset) |
| Sets the top offset for an OilBitmap. | |
| UINT32 | GetTopOffset () const |
| Gets the top offset for an OilBitmap. | |
| BOOL | IsBrowserPalette () const |
| To see if the palette attached to this bitmap is browser compatible. | |
| BOOL | ArePalettesTheSame (const LPLOGPALETTE pLogPalette, const INT32 TransColour=-1) |
| To see if the palette attached to this bitmap is browser compatible. It runs through the colours in a browser palette and checks to see if they are all present. The ordering is not checked and so the palette may be different from the one that we actually use. | |
| UINT32 | GetHorizontalDPI () const |
| Retrieve information on this bitmap. | |
| UINT32 | GetVerticalDPI () const |
| Retrieve information on this bitmap. | |
| void | SetName (String_256 &NewName) |
| Set information on this bitmap. | |
| String_256 & | GetName () |
| Retrieve information on this bitmap. | |
| LPBITMAPINFO | GetBitmapInfo () |
| To get at the BITMAPINFO that this bitmap may have. | |
| LPRGBQUAD | GetPaletteForBitmap () |
| To get at the RGBQUAD palette that this bitmap may have. | |
| LPBITMAPINFOHEADER | GetBitmapInfoHeader () |
| To get at the BITMAPINFOHEADER that this bitmap should have. | |
| void | SetUsedByBrush (BOOL Used) |
| BOOL | IsUsedByBrush () |
| virtual void | SetXPEInfo (KernelBitmap *pMasterBitmap, IXMLDOMDocumentPtr pNewEditList) |
| Sets the XPE edit list document for this bitmap. | |
| virtual void | GetXPEInfo (KernelBitmap *&refMasterBitmap, IXMLDOMDocumentPtr &refEditList, BOOL bEnsureList=FALSE) |
| Gets the stored XPE information for this bitmap. | |
| virtual BOOL | IsXPEMaster () |
| Gets the XPE master status of this bitmap by searching the bitmap list. | |
| virtual BOOL | DestroyXPEInfo () |
| Aks the user whether he wants to destroy XPE info. | |
| virtual void | ReplaceOILBitmap (LPBYTE pBits, LPBITMAPINFO pInfo) |
| Remove the OIL bitmap from memory if it can be constructed from master and edits. | |
Static Public Member Functions | |
| static KernelBitmap * | MakeKernelBitmap (OILBitmap *pBitmap=NULL, Document *pDoc=NULL, BOOL bAlwaysNew=FALSE) |
| Makes a KernelBitmap from an OIL bitmap. Will use an existing one if the OILBitmap is already in use in the Doc. | |
| static void | SetCreateTracker (List *pList) |
| static BOOL | ImportBitmap (CCLexFile *pFile, BaseBitmapFilter *pBitmapFilter, BaseCamelotFilter *pFilter, BOOL IsCompressed, RGBTRIPLE *pPalette, UINT32 NumberOfPaletteEntries, KernelBitmap **ppImportedBitmap, BOOL *IsNew) |
| Imports a bitmap, and checks to see if the bitmap already exist, returning a pointer to the existing bitmap if possible, or creates a new one. | |
| static BOOL | ImportBitmap (Filter *pFilter, const BitmapInfo *pInfo, INT32 BitmapType, KernelBitmap **, BOOL *) |
| Imports a bitmap, and checks to see if the bitmap already exist, returning a pointer to the existing bitmap if possible, or creates a new one. | |
| static KernelBitmap * | TryAndUseExistingBitmap (OILBitmap *pOILBitmap, Document *pDoc, BOOL *IsNew) |
| Imports a bitmap, and checks to see if the bitmap already exist, returning a pointer to the existing bitmap if possible, or creates a new one. | |
Public Attributes | |
| OILBitmap * | ActualBitmap |
Static Public Attributes | |
| static List * | s_pTrackerList = NULL |
Protected Attributes | |
| BitmapList * | m_pParentList |
| BOOL | m_bDontDeleteActualBitmap: 1 |
| BOOL | m_bFractalAttached: 1 |
| BOOL | m_bUsedByBrush: 1 |
Friends | |
| class | BitmapList |
Definition at line 483 of file bitmap.h.
|
||||||||||||
|
Constructor for kernel bitmaps. Attaches to the OILBitmap and increases its usage count.
Definition at line 294 of file bitmap.cpp. 00295 { 00296 m_pParentList = NULL; 00297 m_bDontDeleteActualBitmap = FALSE; 00298 m_bFractalAttached = FALSE; 00299 m_bUsedByBrush = FALSE; 00300 if (pBitmap == NULL) 00301 ActualBitmap = OILBitmap::Attach(); 00302 else 00303 ActualBitmap = OILBitmap::Attach(pBitmap, IsTemp); 00304 00305 if (ActualBitmap && ActualBitmap->IsAFractal()) 00306 m_bFractalAttached = TRUE; 00307 }
|
|
|
Copy constructor for kernel bitmaps. MAintains usage count on OILBitmap.
Definition at line 390 of file bitmap.cpp. 00391 { 00392 m_pParentList = NULL; 00393 m_bDontDeleteActualBitmap = FALSE; 00394 m_bFractalAttached = FALSE; 00395 m_bUsedByBrush = FALSE; 00396 ActualBitmap = OILBitmap::Attach( other.ActualBitmap, other.ActualBitmap->IsTemp() ); 00397 00398 if (ActualBitmap && ActualBitmap->IsAFractal()) 00399 m_bFractalAttached = TRUE; 00400 }
|
|
||||||||||||||||||||||||
|
Constructor for kernel bitmaps which attaches it to a blank OILbitmap. Actually, the OILBitmap isn't really blank, it is entirely uninitialised i.e its contents will be random (including its palette if it has one).
Definition at line 417 of file bitmap.cpp. 00418 { 00419 m_pParentList = NULL; 00420 m_bDontDeleteActualBitmap = FALSE; 00421 m_bFractalAttached = FALSE; 00422 m_bUsedByBrush = FALSE; 00423 OILBitmap *bm = OILBitmap::Create( Width, Height, Depth, dpi ); 00424 if (bm) 00425 ActualBitmap = OILBitmap::Attach( bm, bTemp ); 00426 else 00427 ActualBitmap = NULL; 00428 }
|
|
|
Destructor. Detaches any current OILBitmap.
Definition at line 458 of file bitmap.cpp. 00459 { 00460 if (m_pParentList != NULL) 00461 { 00462 // If we're still in the bitmap list, then remove us 00463 m_pParentList->RemoveItem(this); 00464 m_pParentList = NULL; 00465 } 00466 00467 if (ActualBitmap) 00468 { 00469 ERROR3IF_OILBMP_PTR_INVALID(ActualBitmap, 00470 "Bitmap Error. Found a reference to a deleted bitmap."); 00471 00472 // JustinF says: made the above check in retail builds as well, or we'll crash! 00473 if (//(INT32) ActualBitmap->m_pColourVersion != 0xFEEEFEEE && 00474 //(INT32) ActualBitmap->m_pColourVersion != 0xCDCDCDCD && 00475 //(INT32) ActualBitmap->m_pColourVersion != 0xDDDDDDDD && 00476 !m_bDontDeleteActualBitmap && 00477 !m_bFractalAttached && 00478 ActualBitmap->IsTemp()) 00479 { 00480 delete ActualBitmap; 00481 } 00482 00483 // AndyH says: what a load of rubbish. 00484 // ActualBitmap->m_pColourVersion never evaluates to the constants 00485 // given above in the release build. In fact bug 6712 occurs because 00486 // we try to delete a KernelBitmap whose OILBitmap has already been 00487 // deleted; in turn, this function deletes ActualBitmap (an OILBitmap) 00488 // and causes an access violation. 00489 00490 // By removing the above 'bodge', such access violations will occur in 00491 // debug mode too, as they should. 00492 00493 ActualBitmap = NULL; 00494 } 00495 }
|
|
||||||||||||
|
To see if the palette attached to this bitmap is browser compatible. It runs through the colours in a browser palette and checks to see if they are all present. The ordering is not checked and so the palette may be different from the one that we actually use.
Definition at line 2017 of file bitmap.cpp. 02018 { 02019 if (ActualBitmap != NULL) 02020 return ActualBitmap->ArePalettesTheSame(pLogPalette, TransColour); 02021 02022 return FALSE; 02023 }
|
|
|
Adds this kernel bitmap to the specified document bitmap list.
Definition at line 1207 of file bitmap.cpp. 01208 { 01209 if (BmpList == NULL) 01210 BmpList = m_pParentList; 01211 01212 ERROR3IF(BmpList == NULL, "Warning ... NULL BmpList in KernelBitmap::Attach"); 01213 if (BmpList == NULL) 01214 return; 01215 01216 if (m_pParentList == NULL) 01217 { 01218 TRACEUSER( "Neville", _T("Attaching KBmp @ %x, to List at %x\n"), this, BmpList ); 01219 m_pParentList = BmpList; 01220 BmpList->AddItem(this); 01221 01222 if (KernelBitmap::s_pTrackerList) 01223 { 01224 KernelBmpListItem* pItem = new KernelBmpListItem(this); 01225 if (pItem) 01226 KernelBitmap::s_pTrackerList->AddTail(pItem); 01227 } 01228 } 01229 01230 ActualBitmap->RebuildXPEBitmap(); 01231 }
|
|
||||||||||||
|
Converts the OILbitmap from its present 24bpp form into an 8bpp form which should closely match the one that was exported.
Definition at line 735 of file bitmap.cpp. 00736 { 00737 ERROR2IF(pPalette == NULL,FALSE,"KernelBitmap::Convert24To8 null pFilter"); 00738 ERROR2IF(NumberOfPaletteEntries == 0,FALSE,"KernelBitmap::Convert24To8 NumberOfPaletteEntries = 0"); 00739 00740 if (ActualBitmap == NULL) 00741 return FALSE; 00742 00743 // If the bitmap is already 8bpp then do nothing 00744 if (GetBPP() == 8) 00745 return TRUE; 00746 00747 return ActualBitmap->Convert24To8(pPalette, NumberOfPaletteEntries); 00748 }
|
|
|
Creates a greyscale version of this bitmap.
Definition at line 1597 of file bitmap.cpp. 01598 { 01599 if (ActualBitmap == NULL) 01600 return FALSE; 01601 01602 ERROR3IF_OILBMP_PTR_INVALID(ActualBitmap, 01603 "Bitmap Error. Found a reference to a deleted bitmap."); 01604 01605 if (!IsGreyscale()) 01606 { 01607 // if (GetBPP() == 8 && !ForceGreyBmp) 01608 if (!ForceGreyBmp) 01609 { 01610 // If the bitmap is already a paletted bitmap, then we don't 01611 // need to generate a greyscale version, 'cus we can use some 01612 // clever palette manipulation 01613 GenerateGreyscaleTable(); 01614 } 01615 else 01616 { 01617 // Make a new grey level version of the bitmap 01618 OILBitmap* pOILBmp = DIBUtil::Create8bppGreyscaleBitmap(this); 01619 if (pOILBmp == NULL) 01620 return FALSE; 01621 01622 pOILBmp->m_bIsGreyscale = TRUE; 01623 ActualBitmap->SetGreyscaleVersion(pOILBmp); 01624 } 01625 } 01626 01627 return TRUE; 01628 }
|
|
|
Destroys the greyscale version of this bitmap.
Definition at line 1640 of file bitmap.cpp. 01641 { 01642 if (ActualBitmap == NULL) 01643 return FALSE; 01644 01645 ERROR3IF_OILBMP_PTR_INVALID(ActualBitmap, 01646 "Bitmap Error. Found a reference to a deleted bitmap."); 01647 01648 return ActualBitmap->DestroyGreyscaleVersion(); 01649 }
|
|
|
Aks the user whether he wants to destroy XPE info.
Definition at line 1530 of file bitmap.cpp. 01531 { 01532 if (ActualBitmap==NULL) 01533 return TRUE; 01534 01535 PORTNOTETRACE("other","KernelBitmap::DestroyXPEInfo - do nothing"); 01536 #ifndef EXCLUDE_FROM_XARALX 01537 IXMLDOMDocumentPtr pEdits = NULL; 01538 OILBitmap* pMaster = NULL; 01539 ActualBitmap->GetXPEInfo(pMaster, pEdits); 01540 01541 if (pEdits==NULL || pMaster==NULL) 01542 return TRUE; 01543 01544 INT32 iButton = InformWarning(_R(IDS_XPE_DESTROY_MSG), _R(IDS_CONTINUE), _R(IDS_CANCEL)); 01545 if (iButton==1) 01546 { 01547 ActualBitmap->DestroyXPEInfo(); 01548 } 01549 return (iButton==1); 01550 #else 01551 return TRUE; 01552 #endif 01553 }
|
|
|
Removes this kernel bitmap from it's current document bitmap list.
Definition at line 1247 of file bitmap.cpp. 01248 { 01249 // For each document 01250 // If bitmap is used in document 01251 // Go though all the documents 01252 Document* pDoc = (Document*)GetApplication()->Documents.GetHead(); 01253 while (pDoc != NULL) 01254 { 01255 if (ActualBitmap->IsUsedInDocument(pDoc)) 01256 return; 01257 01258 // Move onto the next document 01259 pDoc = (Document*)GetApplication()->Documents.GetNext(pDoc); 01260 } 01261 01262 // If we got here then the bitmap is not used in any document 01263 // so we can safely vape its data if we can later rebuild it 01264 ActualBitmap->RemoveXPEBitmap(); 01265 }
|
|
|
Extracts the OILBitmap from this kernel bitmap AND DELETES THIS KERNEL BITMAP.
Definition at line 1662 of file bitmap.cpp. 01663 { 01664 if (ActualBitmap == NULL) 01665 return NULL; 01666 01667 ERROR3IF_OILBMP_PTR_INVALID(ActualBitmap, 01668 "Bitmap Error. Found a reference to a deleted bitmap."); 01669 01670 OILBitmap* pBmp = ActualBitmap; 01671 01672 if (ActualBitmap->IsInGlobalList()) 01673 ActualBitmap->RemoveFromGlobalList(); 01674 01675 #ifdef _DEBUG 01676 ActualBitmap->m_bIsAttached = FALSE; 01677 #endif 01678 01679 m_bDontDeleteActualBitmap = TRUE; 01680 delete this; 01681 01682 return pBmp; 01683 }
|
|
|
Definition at line 1726 of file bitmap.cpp. 01727 { 01728 // if (ActualBitmap == NULL || GetBPP() != 8) 01729 if (ActualBitmap == NULL || GetBPP()>8) 01730 return; 01731 01732 ActualBitmap->GenerateGreyscaleTable(); 01733 }
|
|
|
Definition at line 508 of file bitmap.h. 00508 { return ActualBitmap; }
|
|
|
Returns the GIF restore type for an OilBitmap.
Definition at line 1885 of file bitmap.cpp. 01886 { 01887 if (ActualBitmap != NULL) 01888 return ActualBitmap->GetAnimationRestoreType(); 01889 01890 return GDM_LEAVE; 01891 }
|
|
|
Helper function to get the actual bits (as in Bitmap).
Definition at line 1177 of file bitmap.cpp. 01178 { 01179 OILBitmap* pOILy = GetActualBitmap(); 01180 if (pOILy == NULL) 01181 { 01182 TRACE( _T("KernelBitmap::GetBitmapBits() - no OILBitmap") ); 01183 return NULL; 01184 } 01185 01186 ERROR3IF(!pOILy->IS_KIND_OF(OILBitmap), "pOILy isn't"); 01187 01188 return pOILy->GetBitmapBits(); 01189 }
|
|
|
To get at the BITMAPINFO that this bitmap may have.
Note: Only use from Winoil code Definition at line 2131 of file bitmap.cpp. 02132 { 02133 if (ActualBitmap != NULL) 02134 return ActualBitmap->GetBitmapInfo(); 02135 02136 return NULL; 02137 }
|
|
|
To get at the BITMAPINFOHEADER that this bitmap should have.
Note: Only use from Winoil code Definition at line 2182 of file bitmap.cpp. 02183 { 02184 if (ActualBitmap != NULL) 02185 return ActualBitmap->GetBitmapInfoHeader(); 02186 02187 return NULL; 02188 }
|
|
|
Finds the colour resolution of this bitmap.
Definition at line 1280 of file bitmap.cpp. 01281 { 01282 if (ActualBitmap == NULL) 01283 return 0; 01284 01285 ERROR3IF_OILBMP_PTR_INVALID(ActualBitmap,"Bitmap Error. Found a reference to a deleted bitmap."); 01286 01287 return ActualBitmap->GetBPP(); 01288 }
|
|
|
Returns m_AnimDelay for an OilBitmap.
Definition at line 1818 of file bitmap.cpp. 01819 { 01820 if (ActualBitmap != NULL) 01821 return ActualBitmap->GetBitmapAnimDelay(); 01822 01823 return 0; 01824 }
|
|
|
Gets the greyscale version of this bitmap.
Definition at line 1695 of file bitmap.cpp. 01696 { 01697 if (ActualBitmap == NULL) 01698 return NULL; 01699 01700 ERROR3IF_OILBMP_PTR_INVALID(ActualBitmap, 01701 "Bitmap Error. Found a reference to a deleted bitmap."); 01702 01703 if (IsGreyscale()) 01704 return ActualBitmap; 01705 01706 OILBitmap* pGreyBmp = ActualBitmap->GetGreyscaleVersion(); 01707 if (pGreyBmp == NULL) 01708 { 01709 // Make a greyscale bitmap 01710 CreateGreyscaleVersion(ForceGreyBmp); 01711 } 01712 01713 return ActualBitmap->GetGreyscaleVersion(); 01714 }
|
|
|
Finds the height of this bitmap.
Definition at line 1320 of file bitmap.cpp. 01321 { 01322 if (ActualBitmap == NULL) 01323 return 0; 01324 01325 return ActualBitmap->GetHeight(); 01326 }
|
|
|
Retrieve information on this bitmap.
Definition at line 2036 of file bitmap.cpp. 02037 { 02038 if (ActualBitmap != NULL) 02039 return ActualBitmap->GetHorizontalDPI(); 02040 02041 return 96; 02042 }
|
|
|
Returns m_bInterpolation for an OilBitmap.
Definition at line 1851 of file bitmap.cpp. 01852 { 01853 if (ActualBitmap != NULL) 01854 return ActualBitmap->GetInterpolation(); 01855 01856 return 0; 01857 }
|
|
|
Gets the left offset for an OilBitmap.
Definition at line 1938 of file bitmap.cpp. 01939 { 01940 if (ActualBitmap != NULL) 01941 return ActualBitmap->GetLeftOffset(); 01942 01943 return 0; 01944 }
|
|
|
Retrieve information on this bitmap.
Definition at line 2096 of file bitmap.cpp. 02097 { 02098 if (ActualBitmap != NULL) 02099 return ActualBitmap->GetName(); 02100 02101 02102 // In the "oh no where's the ActualBitmap" case 02103 // The old code used to be: 02104 // return String_256(""); 02105 // This static dummy object is used for returning in the error case 02106 // The original used to return a ptr to a local variable, which is a tad dangerous. 02107 // This solution is not ideal, because there's a permanent instance of an object 02108 // that will probably never be used. 02109 static String_256 Dummy(""); 02110 return Dummy; 02111 }
|
|
|
Finds the number of colours colour in this bitmap.
Definition at line 1339 of file bitmap.cpp. 01340 { 01341 if (ActualBitmap == NULL) 01342 return 0; 01343 01344 return ActualBitmap->GetNumPaletteEntries(); 01345 }
|
|
||||||||||||
|
Gets the original bitmap file buffer associated with this reference.
Definition at line 1399 of file bitmap.cpp. 01400 { 01401 if (ActualBitmap == NULL) 01402 return FALSE; 01403 01404 ERROR3IF_OILBMP_PTR_INVALID(ActualBitmap, 01405 "Bitmap Error. Found a reference to a deleted bitmap."); 01406 01407 // The OILBitmap has the reference in it 01408 return ActualBitmap->GetOriginalSource(pSource, ppImportFilter); 01409 }
|
|
|
To get at the RGBQUAD palette that this bitmap may have.
Note: Only use from Winoil code Definition at line 2157 of file bitmap.cpp. 02158 { 02159 if (ActualBitmap != NULL) 02160 return ActualBitmap->GetPaletteForBitmap(); 02161 02162 return NULL; 02163 }
|
|
|
Definition at line 538 of file bitmap.h. 00538 { return m_pParentList; }
|
|
|
Finds the recommended height of the bitmap.
Definition at line 1118 of file bitmap.cpp. 01119 { 01120 INT32 Height = 0; 01121 01122 if (ActualBitmap) 01123 { 01124 Height = ActualBitmap->GetRecommendedHeight(); 01125 } 01126 01127 return Height; 01128 }
|
|
|
Finds the recommended width of the bitmap.
Definition at line 1095 of file bitmap.cpp. 01096 { 01097 INT32 Width = 0; 01098 01099 if (ActualBitmap) 01100 { 01101 Width = ActualBitmap->GetRecommendedWidth(); 01102 } 01103 01104 return Width; 01105 }
|
|
|
Gets the top offset for an OilBitmap.
Definition at line 1974 of file bitmap.cpp. 01975 { 01976 if (ActualBitmap != NULL) 01977 return ActualBitmap->GetTopOffset(); |