summaryrefslogtreecommitdiff
path: root/goodies
diff options
context:
space:
mode:
authorArmin Weiss <aw@openoffice.org>2000-11-14 12:28:42 +0000
committerArmin Weiss <aw@openoffice.org>2000-11-14 12:28:42 +0000
commit0e72cd33cce4cf3f115201741dca2edaff3a1f44 (patch)
tree2ccd7cfc7dfba1a8a940f46e0ef1c60e7ce8ec5f /goodies
parentba43049338ccc1b44847cc1742a546af25d6336f (diff)
#79575# mbGhosted flag added to compare criteria for texture cache
Diffstat (limited to 'goodies')
-rw-r--r--goodies/inc/b3dtex.hxx18
-rw-r--r--goodies/source/base3d/b3dtex.cxx69
2 files changed, 54 insertions, 33 deletions
diff --git a/goodies/inc/b3dtex.hxx b/goodies/inc/b3dtex.hxx
index 3aeecdb85de1..815f9e245e8f 100644
--- a/goodies/inc/b3dtex.hxx
+++ b/goodies/inc/b3dtex.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b3dtex.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:30:08 $
+ * last change: $Author: aw $ $Date: 2000-11-14 13:27:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -183,11 +183,15 @@ enum Base3DTextureWrap
class TextureAttributes
{
private:
+ BOOL mbGhosted;
+
public:
- TextureAttributes();
+ TextureAttributes(BOOL bGhosted);
- virtual BOOL operator==(const TextureAttributes&) const =0;
+ virtual BOOL operator==(const TextureAttributes&) const;
virtual UINT16 GetTextureAttributeType() const =0;
+
+ BOOL GetGhostedAttribute() { return mbGhosted; }
};
class TextureAttributesBitmap : public TextureAttributes
@@ -196,7 +200,7 @@ private:
Bitmap aBitmapAttribute;
public:
- TextureAttributesBitmap(Bitmap aBmp);
+ TextureAttributesBitmap(Bitmap aBmp, BOOL bGhosted);
virtual BOOL operator==(const TextureAttributes&) const;
virtual UINT16 GetTextureAttributeType() const;
@@ -211,7 +215,7 @@ private:
void* pStepCount;
public:
- TextureAttributesGradient(void* pF, void *pSC);
+ TextureAttributesGradient(void* pF, void *pSC, BOOL bGhosted);
virtual BOOL operator==(const TextureAttributes&) const;
virtual UINT16 GetTextureAttributeType() const;
@@ -226,7 +230,7 @@ private:
void* pFill;
public:
- TextureAttributesHatch(void* pF);
+ TextureAttributesHatch(void* pF, BOOL bGhosted);
virtual BOOL operator==(const TextureAttributes&) const;
virtual UINT16 GetTextureAttributeType() const;
diff --git a/goodies/source/base3d/b3dtex.cxx b/goodies/source/base3d/b3dtex.cxx
index 39c67644b30f..70f26d25b7ed 100644
--- a/goodies/source/base3d/b3dtex.cxx
+++ b/goodies/source/base3d/b3dtex.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: b3dtex.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 16:30:10 $
+ * last change: $Author: aw $ $Date: 2000-11-14 13:28:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -81,26 +81,35 @@
|*
\************************************************************************/
-TextureAttributes::TextureAttributes()
+TextureAttributes::TextureAttributes(BOOL bGhosted)
+: mbGhosted(bGhosted)
{
}
+BOOL TextureAttributes::operator==(const TextureAttributes& rAtt) const
+{
+ return (rAtt.mbGhosted == mbGhosted);
+}
+
// Fuer Bitmaps
-TextureAttributesBitmap::TextureAttributesBitmap(Bitmap aBmp)
-: TextureAttributes(),
+TextureAttributesBitmap::TextureAttributesBitmap(Bitmap aBmp, BOOL bGhosted)
+: TextureAttributes(bGhosted),
aBitmapAttribute(aBmp)
{
}
BOOL TextureAttributesBitmap::operator==(const TextureAttributes& rAtt) const
{
- if(GetTextureAttributeType() == rAtt.GetTextureAttributeType())
+ if(TextureAttributes::operator==(rAtt))
{
- const TextureAttributesBitmap& rAttBmp = (const TextureAttributesBitmap&)rAtt;
+ if(GetTextureAttributeType() == rAtt.GetTextureAttributeType())
+ {
+ const TextureAttributesBitmap& rAttBmp = (const TextureAttributesBitmap&)rAtt;
- if(rAttBmp.aBitmapAttribute == aBitmapAttribute)
- return TRUE;
+ if(rAttBmp.aBitmapAttribute == aBitmapAttribute)
+ return TRUE;
+ }
}
return FALSE;
}
@@ -112,8 +121,8 @@ UINT16 TextureAttributesBitmap::GetTextureAttributeType() const
// Fuer Gradientfills
-TextureAttributesGradient::TextureAttributesGradient(void* pF, void *pSC)
-: TextureAttributes(),
+TextureAttributesGradient::TextureAttributesGradient(void* pF, void *pSC, BOOL bGhosted)
+: TextureAttributes(bGhosted),
pFill(pF),
pStepCount(pSC)
{
@@ -121,13 +130,16 @@ TextureAttributesGradient::TextureAttributesGradient(void* pF, void *pSC)
BOOL TextureAttributesGradient::operator==(const TextureAttributes& rAtt) const
{
- if(GetTextureAttributeType() == rAtt.GetTextureAttributeType())
+ if(TextureAttributes::operator==(rAtt))
{
- const TextureAttributesGradient& rAttGra = (const TextureAttributesGradient&)rAtt;
+ if(GetTextureAttributeType() == rAtt.GetTextureAttributeType())
+ {
+ const TextureAttributesGradient& rAttGra = (const TextureAttributesGradient&)rAtt;
- if(rAttGra.pFill == pFill
- && rAttGra.pStepCount == pStepCount)
- return TRUE;
+ if(rAttGra.pFill == pFill
+ && rAttGra.pStepCount == pStepCount)
+ return TRUE;
+ }
}
return FALSE;
}
@@ -139,20 +151,23 @@ UINT16 TextureAttributesGradient::GetTextureAttributeType() const
// Fuer Hatchfills
-TextureAttributesHatch::TextureAttributesHatch(void* pF)
-: TextureAttributes(),
+TextureAttributesHatch::TextureAttributesHatch(void* pF, BOOL bGhosted)
+: TextureAttributes(bGhosted),
pFill(pF)
{
}
BOOL TextureAttributesHatch::operator==(const TextureAttributes& rAtt) const
{
- if(GetTextureAttributeType() == rAtt.GetTextureAttributeType())
+ if(TextureAttributes::operator==(rAtt))
{
- const TextureAttributesHatch& rAttHat = (const TextureAttributesHatch&)rAtt;
+ if(GetTextureAttributeType() == rAtt.GetTextureAttributeType())
+ {
+ const TextureAttributesHatch& rAttHat = (const TextureAttributesHatch&)rAtt;
- if(rAttHat.pFill == pFill)
- return TRUE;
+ if(rAttHat.pFill == pFill)
+ return TRUE;
+ }
}
return FALSE;
}
@@ -162,7 +177,6 @@ UINT16 TextureAttributesHatch::GetTextureAttributeType() const
return TEXTURE_ATTRIBUTE_TYPE_HATCH;
}
-
/*************************************************************************
|*
|* Konstruktor Textur
@@ -197,18 +211,21 @@ B3dTexture::B3dTexture(
{
case TEXTURE_ATTRIBUTE_TYPE_BITMAP :
pAttributes = new TextureAttributesBitmap(
- ((TextureAttributesBitmap&)rAtt).GetBitmapAttribute());
+ ((TextureAttributesBitmap&)rAtt).GetBitmapAttribute(),
+ rAtt.GetGhostedAttribute());
break;
case TEXTURE_ATTRIBUTE_TYPE_GRADIENT :
pAttributes = new TextureAttributesGradient(
((TextureAttributesGradient&)rAtt).GetFillAttribute(),
- ((TextureAttributesGradient&)rAtt).GetStepCountAttribute());
+ ((TextureAttributesGradient&)rAtt).GetStepCountAttribute(),
+ rAtt.GetGhostedAttribute());
break;
case TEXTURE_ATTRIBUTE_TYPE_HATCH :
pAttributes = new TextureAttributesHatch(
- ((TextureAttributesHatch&)rAtt).GetHatchFillAttribute());
+ ((TextureAttributesHatch&)rAtt).GetHatchFillAttribute(),
+ rAtt.GetGhostedAttribute());
break;
}