added more support functions
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@12052 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
80547db1f2
commit
517e54d0d9
@ -15,6 +15,8 @@
|
||||
#include <agg_span_image_filter_rgba32.h>
|
||||
#include <agg_span_interpolator_linear.h>
|
||||
|
||||
#include "LayerData.h"
|
||||
|
||||
#include "AGGTextRenderer.h"
|
||||
#include "DrawingMode.h"
|
||||
#include "DrawingModeFactory.h"
|
||||
@ -139,6 +141,26 @@ Painter::DetachFromBuffer()
|
||||
_MakeEmpty();
|
||||
}
|
||||
|
||||
// SetDrawData
|
||||
void
|
||||
Painter::SetDrawData(const DrawData* data)
|
||||
{
|
||||
// for now...
|
||||
SetHighColor(data->highcolor.GetColor32());
|
||||
SetLowColor(data->lowcolor.GetColor32());
|
||||
SetScale(data->scale);
|
||||
SetPenSize(data->pensize);
|
||||
// SetOrigin();
|
||||
SetDrawingMode(data->draw_mode);
|
||||
SetBlendingMode(data->alphaSrcMode, data->alphaFncMode);
|
||||
SetPenLocation(data->penlocation);
|
||||
SetFont(data->font);
|
||||
if (data->clipReg) {
|
||||
ConstrainClipping(*data->clipReg);
|
||||
}
|
||||
fPatternHandler->SetPattern(data->patt);
|
||||
}
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
// ConstrainClipping
|
||||
@ -700,6 +722,15 @@ Painter::InvertRect(const BRect& r) const
|
||||
}
|
||||
}
|
||||
|
||||
// BoundingBox
|
||||
BRect
|
||||
Painter::BoundingBox(const char* utf8String, uint32 length,
|
||||
const BPoint& baseLine) const
|
||||
{
|
||||
Transformable transform;
|
||||
transform.TranslateBy(baseLine);
|
||||
return fTextRenderer->Bounds(utf8String, length, transform);
|
||||
}
|
||||
|
||||
// #pragma mark -
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user