drawing-image.cpp revision 28f74a03fc1d9ebe507ee0c8f6c361c06c2ea27e
/**
* @file
* Bitmap image belonging to an SVG drawing.
*//*
* 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/drawing-context.h"
#include "display/drawing-image.h"
#include "preferences.h"
#include "style.h"
namespace Inkscape {
{}
{
if (_style)
if (_pixbuf) {
}
}
void
{
// when done in this order, it won't break if pb == image->pixbuf and the refcount is 1
g_object_ref (pb);
}
}
_markForUpdate(STATE_ALL, false);
}
void
{
}
void
{
_markForUpdate(STATE_ALL, false);
}
void
{
_origin = o;
_markForUpdate(STATE_ALL, false);
}
void
{
_markForUpdate(STATE_ALL, false);
}
DrawingImage::bounds() const
{
return ret;
}
unsigned
{
// Calculate bbox
if (_pixbuf) {
_bbox = r.roundOutwards();
} else {
}
return STATE_ALL;
}
unsigned DrawingImage::_renderItem(DrawingContext &ct, Geom::IntRect const &/*area*/, unsigned /*flags*/, DrawingItem * /*stop_at*/)
{
if (!outline) {
}
//ct.paint(_opacity);
} else { // outline; draw a rect instead
// the box
// the diagonals
}
}
return RENDER_OK;
}
/** Calculates the closest distance from p to the segment a1-a2*/
static double
{
// calculate sides of the triangle and their squares
double a_2 = a * a;
// if one of the angles at the base is > 90, return the corresponding side
// otherwise calculate the height to the base
}
{
if (outline) {
// frame
// diagonals
return NULL;
} else {
return NULL;
return NULL;
// pick if the image is less than 99% transparent
}
}
} // 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 :