CMXReferBitmap Class Reference

#include <cmxexdc.h>

Inheritance diagram for CMXReferBitmap:

CMXReferListItem ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 CMXReferBitmap (CMXExportDC *pDC)
void Set (KernelBitmap *pBitmap, DocColour *pStartCol, DocColour *pEndCol, EFFECTTYPE tEffect)
BOOL IsInWhichIndex (void)
BOOL WriteInIndex (CMXExportDC *pDC)
 writes the relevant entry in the procedure index of the file
INT32 IndexEntrySize (CMXExportDC *pDC)
BOOL IsASection (void)
BOOL WriteSection (CMXExportDC *pDC)
 writes the relevant entry in the procedure index of the file
BOOL AreYouThisBitmap (KernelBitmap *pBitmap, DocColour *pStartCol, DocColour *pEndCol, EFFECTTYPE tEffect)
KernelBitmapGetBitmap (void)

Protected Attributes

INT32 BitmapFileOffset
KernelBitmapRef Ref
DocColour StartColour
DocColour EndColour
EFFECTTYPE Effect
BOOL Contone

Private Member Functions

 CC_DECLARE_DYNAMIC (CMXReferBitmap)

Detailed Description

Definition at line 749 of file cmxexdc.h.


Constructor & Destructor Documentation

CMXReferBitmap::CMXReferBitmap CMXExportDC pDC  )  [inline]
 

Definition at line 754 of file cmxexdc.h.

00754                                      : CMXReferListItem(pDC)
00755         {Effect = EFFECT_RGB; Contone = FALSE;};


Member Function Documentation

BOOL CMXReferBitmap::AreYouThisBitmap KernelBitmap pBitmap,
DocColour pStartCol,
DocColour pEndCol,
EFFECTTYPE  tEffect
[inline]
 

Definition at line 769 of file cmxexdc.h.

00770         {return ((pBitmap == Ref.GetBitmap())
00771             && ( (!Contone && (pStartCol == NULL)) || ((pStartCol != NULL) && ((*pStartCol) == StartColour)))
00772             && ( (!Contone && (pEndCol == NULL  )) || ((pEndCol != NULL  ) && ((*pEndCol)   == EndColour  )))
00773             && (tEffect == Effect))
00774             ?TRUE:FALSE;};

CMXReferBitmap::CC_DECLARE_DYNAMIC CMXReferBitmap   )  [private]
 

KernelBitmap* CMXReferBitmap::GetBitmap void   )  [inline]
 

Definition at line 776 of file cmxexdc.h.

00776 {return Ref.GetBitmap();};

INT32 CMXReferBitmap::IndexEntrySize CMXExportDC pDC  )  [inline, virtual]
 

Reimplemented from CMXReferListItem.

Definition at line 764 of file cmxexdc.h.

00764 {return sizeof(cmxEmbedFileIndexEntry)+(pDC->IsThirtyTwoBit()?sizeof(WORD):0);};

BOOL CMXReferBitmap::IsASection void   )  [inline, virtual]
 

Reimplemented from CMXReferListItem.

Definition at line 766 of file cmxexdc.h.

00766 {return TRUE;};

BOOL CMXReferBitmap::IsInWhichIndex void   )  [inline, virtual]
 

Reimplemented from CMXReferListItem.

Definition at line 762 of file cmxexdc.h.

00762 {return cmxINDEX_EMBEDFILE;};

void CMXReferBitmap::Set KernelBitmap pBitmap,
DocColour pStartCol,
DocColour pEndCol,
EFFECTTYPE  tEffect
[inline]
 

Definition at line 757 of file cmxexdc.h.

00758         {if(pStartCol != 0 && pEndCol != 0)
00759             {StartColour = *pStartCol; EndColour = *pEndCol; Contone = TRUE;}
00760             Effect = tEffect; Ref.Attach(pBitmap, NULL);};

BOOL CMXReferBitmap::WriteInIndex CMXExportDC pDC  )  [virtual]
 

writes the relevant entry in the procedure index of the file

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/07/96
Parameters:
export dc [INPUTS]
Returns:
success
See also:

Reimplemented from CMXReferListItem.

Definition at line 2328 of file cmxdcobj.cpp.

02329 {
02330     cmxEmbedFileIndexEntry en;
02331     pDC->WriteSizeInFile(sizeof(en));
02332     en.Offset = BitmapFileOffset;
02333     en.Type = cmxEMBEDFILETYPE_RIMAGE;
02334 
02335     return pDC->WriteData(&en, sizeof(en));
02336 }

BOOL CMXReferBitmap::WriteSection CMXExportDC pDC  )  [virtual]
 

writes the relevant entry in the procedure index of the file

Author:
Ben_Summers (Xara Group Ltd) <camelotdev@xara.com>
Date:
15/07/96
Parameters:
export dc [INPUTS]
Returns:
success
See also:

Reimplemented from CMXReferListItem.

Definition at line 2352 of file cmxdcobj.cpp.

02353 {
02354     // get the winoil bitmap associated with this thingy
02355     // this is non kernelally stuff, but noone else cares when they do it
02356     KernelBitmap *pBitmap = Ref.GetBitmap();
02357     ERROR2IF(pBitmap == NULL, FALSE, "no bitmap in ref");
02358     OILBitmap *bit = pBitmap->ActualBitmap;
02359     ERROR2IF(bit == NULL, FALSE, "kernel bitmap didn't have a oil bitmap");
02360 
02361     // note the position of the thingy
02362     BitmapFileOffset = pDC->GetFilePosition();
02363 
02364     // contone?
02365     if(Contone)
02366     {
02367         // grab a view for us to use in the following call
02368         View *pView = NULL;
02369         if (pDC->GetRenderRegion()!=NULL)
02370             pView=pDC->GetRenderRegion()->GetRenderView();
02371 
02372         // build the contone bitmap
02373         if (!bit->BuildContonePalette(StartColour, EndColour, Effect, pView))
02374             return FALSE;
02375 
02376         // tell the render region we're exporting a contone bitmap
02377         pDC->GetRenderRegion()->SetAreExportingContoneBitmap(TRUE);
02378     }
02379     else
02380     {
02381         // we're not doing a contoned bitmap
02382         pDC->GetRenderRegion()->SetAreExportingContoneBitmap(FALSE);
02383     }
02384 
02385     // export the bitmap
02386     if(!bit->ExportBitmap(pDC->GetRenderRegion()))
02387         return FALSE;
02388 
02389     if(Contone)
02390     {
02391         // Clean up contone palette
02392         bit->DestroyContonePalette();
02393     }
02394 
02395     return TRUE;
02396 }


Member Data Documentation

INT32 CMXReferBitmap::BitmapFileOffset [protected]
 

Definition at line 776 of file cmxexdc.h.

BOOL CMXReferBitmap::Contone [protected]
 

Definition at line 784 of file cmxexdc.h.

EFFECTTYPE CMXReferBitmap::Effect [protected]
 

Definition at line 783 of file cmxexdc.h.

DocColour CMXReferBitmap::EndColour [protected]
 

Definition at line 782 of file cmxexdc.h.

KernelBitmapRef CMXReferBitmap::Ref [protected]
 

Definition at line 780 of file cmxexdc.h.

DocColour CMXReferBitmap::StartColour [protected]
 

Definition at line 781 of file cmxexdc.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:52:42 2007 for Camelot by  doxygen 1.4.4