drawing-text.cpp revision 6863161782f0ba84327ebdc2eccb1b6a81bf2b85
/**
* @file
* @brief Group belonging to an SVG drawing element
*//*
* Authors:
* Krzysztof KosiĆski <tweenk.pl@gmail.com>
*
* Copyright (C) 2011 Authors
* Released under GNU GPL, read the file 'COPYING' for more information
*/
#include "display/cairo-utils.h"
#include "display/canvas-bpath.h" // for SPWindRule (WTF!)
#include "display/drawing-context.h"
#include "display/drawing-surface.h"
#include "display/drawing-text.h"
#include "libnrtype/font-instance.h"
#include "style.h"
namespace Inkscape {
, _glyph(0)
{}
{
if (_font) {
}
}
void
{
_markForUpdate(STATE_ALL, false);
}
unsigned
DrawingGlyphs::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx, unsigned flags, unsigned reset)
{
if (!ggroup) throw InvalidItemException();
{
return STATE_ALL;
}
}
// save no-miter bbox for picking
_pick_bbox = b->roundOutwards();
// those pesky miters, now
if ( miterMax > 0.01 ) {
// grunt mode. we should compute the various miters instead
// (one for each point on the curve)
}
_bbox = b->roundOutwards();
}
return STATE_ALL;
}
{
// With text we take a simple approach: pick if the point is in a characher bbox
return NULL;
}
{}
{}
void
DrawingText::clear()
{
}
void
{
}
void
{
}
unsigned
DrawingText::_updateItem(Geom::IntRect const &area, UpdateContext const &ctx, unsigned flags, unsigned reset)
{
}
unsigned
DrawingText::_renderItem(DrawingContext &ct, Geom::IntRect const &area, unsigned flags, DrawingItem *stop_at)
{
DrawingGlyphs *g = dynamic_cast<DrawingGlyphs *>(&*i);
if (!g) throw InvalidItemException();
// skip glpyhs with singular transforms
if (g->_ctm.isSingular()) continue;
}
return RENDER_OK;
}
// NOTE: this is very similar to drawing-shape.cpp; the only difference is in path feeding
bool has_stroke, has_fill;
if (has_fill || has_stroke) {
DrawingGlyphs *g = dynamic_cast<DrawingGlyphs *>(&*i);
if (!g) throw InvalidItemException();
if (g->_ctm.isSingular()) continue;
}
if (has_fill) {
ct.fillPreserve();
}
if (has_stroke) {
ct.strokePreserve();
}
}
return RENDER_OK;
}
void
{
// handle clip-rule
if (_style) {
} else {
}
}
DrawingGlyphs *g = dynamic_cast<DrawingGlyphs *>(&*i);
if (!g) throw InvalidItemException();
}
}
{
if (picked) return this;
return NULL;
}
bool
{
return true;
}
} // end namespace Inkscape
/*
Local Variables:
mode:c++
c-file-style:"stroustrup"
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
indent-tabs-mode:nil
fill-column:99
End:
*/
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :