sp-flowregion.cpp revision 43a839137fd761b45d63feca17ce4ecbb045e179
/*
*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include "sp-shape.h"
#include "sp-text.h"
#include "sp-use.h"
#include "style.h"
#include "document.h"
#include "sp-title.h"
#include "sp-desc.h"
#include "sp-flowregion.h"
#include "display/canvas-bpath.h"
#include "sp-factory.h"
namespace {
SPObject* createFlowregion() {
return new SPFlowregion();
}
return new SPFlowregionExclude();
}
bool flowregionRegistered = SPFactory::instance().registerObject("svg:flowRegion", createFlowregion);
bool flowregionExcludeRegistered = SPFactory::instance().registerObject("svg:flowRegionExclude", createFlowregionExclude);
}
}
SPFlowregion::~SPFlowregion() {
for (std::vector<Shape*>::iterator it = this->computed.begin() ; it != this->computed.end() ; ++it) {
delete *it;
}
}
}
/* fixme: hide (Lauris) */
}
unsigned childflags = flags;
if (flags & SP_OBJECT_MODIFIED_FLAG) {
}
l = g_slist_prepend(l, child);
}
l = g_slist_reverse(l);
while (l) {
l = g_slist_remove(l, child);
if (SP_IS_ITEM (child)) {
} else {
}
}
}
this->UpdateComputed();
}
void SPFlowregion::UpdateComputed(void)
{
delete *it;
}
}
}
if (flags & SP_OBJECT_MODIFIED_FLAG) {
}
l = g_slist_prepend(l, child);
}
l = g_slist_reverse(l);
while (l) {
l = g_slist_remove(l, child);
}
}
}
Inkscape::XML::Node *SPFlowregion::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) {
if (flags & SP_OBJECT_WRITE_BUILD) {
}
if (crepr) {
l = g_slist_prepend(l, crepr);
}
}
}
while (l) {
l = g_slist_remove(l, l->data);
}
} else {
}
}
}
this->UpdateComputed(); // copied from update(), see LP Bug 1339305
return repr;
}
const char* SPFlowregion::displayName() const {
// TRANSLATORS: "Flow region" is an area where text is allowed to flow
return _("Flow Region");
}
}
if (this->computed) {
delete this->computed;
}
}
}
/* fixme: hide (Lauris) */
}
if (flags & SP_OBJECT_MODIFIED_FLAG) {
}
l = g_slist_prepend(l, child);
}
l = g_slist_reverse (l);
while (l) {
l = g_slist_remove(l, child);
if (SP_IS_ITEM (child)) {
} else {
}
}
}
this->UpdateComputed();
}
void SPFlowregionExclude::UpdateComputed(void)
{
if (computed) {
delete computed;
}
}
}
if (flags & SP_OBJECT_MODIFIED_FLAG) {
}
l = g_slist_prepend(l, child);
}
l = g_slist_reverse (l);
while (l) {
l = g_slist_remove(l, child);
}
}
}
Inkscape::XML::Node *SPFlowregionExclude::write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, guint flags) {
if (flags & SP_OBJECT_WRITE_BUILD) {
}
if (crepr) {
l = g_slist_prepend(l, crepr);
}
}
while (l) {
l = g_slist_remove(l, l->data);
}
} else {
}
}
return repr;
}
const char* SPFlowregionExclude::displayName() const {
/* TRANSLATORS: A region "cut out of" a flow region; text is not allowed to flow inside the
* flow excluded region. flowRegionExclude in SVG 1.2: see
* http://www.w3.org/TR/2004/WD-SVG12-20041027/flow.html#flowRegion-elem and
* http://www.w3.org/TR/2004/WD-SVG12-20041027/flow.html#flowRegionExclude-elem. */
return _("Flow Excluded Region");
}
{
if (*base_shape == NULL)
*base_shape = new Shape;
if ( (*base_shape)->hasEdges() == false ) {
delete *base_shape;
*base_shape = temp;
}
}
{
} else {
}
if ( SP_IS_SHAPE (u_child) ) {
} else if ( SP_IS_TEXT (u_child) ) {
}
if ( curve ) {
} else {
}
delete uncross;
delete n_shp;
delete temp;
} else {
// printf("no curve\n");
}
}
/*
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 :