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:
@@ -15,6 +15,8 @@
|
|||||||
#include <agg_span_image_filter_rgba32.h>
|
#include <agg_span_image_filter_rgba32.h>
|
||||||
#include <agg_span_interpolator_linear.h>
|
#include <agg_span_interpolator_linear.h>
|
||||||
|
|
||||||
|
#include "LayerData.h"
|
||||||
|
|
||||||
#include "AGGTextRenderer.h"
|
#include "AGGTextRenderer.h"
|
||||||
#include "DrawingMode.h"
|
#include "DrawingMode.h"
|
||||||
#include "DrawingModeFactory.h"
|
#include "DrawingModeFactory.h"
|
||||||
@@ -139,6 +141,26 @@ Painter::DetachFromBuffer()
|
|||||||
_MakeEmpty();
|
_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 -
|
// #pragma mark -
|
||||||
|
|
||||||
// ConstrainClipping
|
// 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 -
|
// #pragma mark -
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user