added a PrintToStream method

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7146 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Adi Oanca 2004-04-03 15:01:10 +00:00
parent 51adcc8405
commit 979f50e101

View File

@ -27,6 +27,7 @@
//------------------------------------------------------------------------------
#include "LayerData.h"
#include <Layer.h>
#include <stdio.h>
DrawData::DrawData(void)
{
@ -136,6 +137,7 @@ LayerData &LayerData::operator=(const LayerData &from)
patt=from.patt;
draw_mode=from.draw_mode;
penlocation=from.penlocation;
lineCap=from.lineCap;
lineJoin=from.lineJoin;
@ -169,3 +171,27 @@ LayerData &LayerData::operator=(const LayerData &from)
return *this;
}
void LayerData::PrintToStream() const{
printf("\t Pen Location and Size: (%f, %f) - %f\n", penlocation.x, penlocation.y, pensize);
printf("\t HighColor: "); highcolor.PrintToStream();
printf("\t LowColor: "); lowcolor.PrintToStream();
printf("\t ViewColor "); viewcolor.PrintToStream();
printf("\t Pattern: %llu\n", patt.GetInt64());
printf("\t DrawMode: %lu\n", (uint32)draw_mode);
printf("\t LineCap: %d\t LineJoin: %d\t MiterLimit: %f\n", (int16)lineCap, (int16)lineJoin, miterLimit);
printf("\t AlphaSrcMode: %ld\t AlphaFncMode: %ld\n", (int32)alphaSrcMode, (int32)alphaFncMode);
printf("\t Scale: %f\n", scale);
if (clippReg)
clippReg->PrintToStream();
printf("\t ===== Font Data =====\n");
printf("\t FontStyle: CURRENTLY NOT SET\n");
printf("\t FontSize: %f\n", font.Size());
printf("\t FontShear: %f\n", font.Shear());
printf("\t FontRotation: %f\n", font.Rotation());
printf("\t FontSpacing: %ld\n", font.Spacing());
printf("\t FontEncoding: %ld\n", font.Encoding());
printf("\t FontFace: %ld\n", font.Face());
printf("\t FontFlags: %lu\n", font.Flags());
}