summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d7bf011)
raw | patch | inline | side by side (parent: d7bf011)
author | bryce <bryce@users.sourceforge.net> | |
Sat, 18 Nov 2006 23:46:55 +0000 (23:46 +0000) | ||
committer | bryce <bryce@users.sourceforge.net> | |
Sat, 18 Nov 2006 23:46:55 +0000 (23:46 +0000) |
dealing with markers, and removing some marker debug stuff.
src/display/nr-arena-shape.cpp | patch | blob | history | |
src/doxygen-main.cpp | patch | blob | history | |
src/sp-shape.cpp | patch | blob | history | |
src/style.cpp | patch | blob | history |
index 8c4b42577b00fceaca3f423b4eb75e10e08ca20c..d3f04a07538acb7a62960b06d6147c994b5c2ca3 100644 (file)
item_class->pick = nr_arena_shape_pick;
}
+/**
+ * Initializes the arena shape, setting all parameters to null, 0, false,
+ * or other defaults
+ */
static void
nr_arena_shape_init(NRArenaShape *shape)
{
((NRObjectClass *) shape_parent_class)->finalize(object);
}
+/**
+ * Retrieves the markers from the item
+ */
static NRArenaItem *
nr_arena_shape_children(NRArenaItem *item)
{
return shape->markers;
}
+/**
+ * Attaches child to item, and if ref is not NULL, sets it and ref->next as
+ * the prev and next items. If ref is NULL, then it sets the item's markers
+ * as the next items.
+ */
static void
nr_arena_shape_add_child(NRArenaItem *item, NRArenaItem *child, NRArenaItem *ref)
{
@@ -160,6 +172,10 @@ nr_arena_shape_add_child(NRArenaItem *item, NRArenaItem *child, NRArenaItem *ref
nr_arena_item_request_update(item, NR_ARENA_ITEM_STATE_ALL, FALSE);
}
+/**
+ * Removes child from the shape. If there are no prev items in
+ * the child, it sets items' markers to the next item in the child.
+ */
static void
nr_arena_shape_remove_child(NRArenaItem *item, NRArenaItem *child)
{
nr_arena_item_request_update(item, NR_ARENA_ITEM_STATE_ALL, FALSE);
}
+/**
+ * Detaches child from item, and if there are no previous items in child, it
+ * sets item's markers to the child. It then attaches the child back onto the item.
+ * If ref is null, it sets the markers to be the next item, otherwise it uses
+ * the next/prev items in ref.
+ */
static void
nr_arena_shape_set_child_position(NRArenaItem *item, NRArenaItem *child, NRArenaItem *ref)
{
@@ -198,6 +220,9 @@ void nr_arena_shape_update_stroke(NRArenaShape *shape, NRGC* gc, NRRectL *area);
void nr_arena_shape_update_fill(NRArenaShape *shape, NRGC *gc, NRRectL *area, bool force_shape = false);
void nr_arena_shape_add_bboxes(NRArenaShape* shape,NRRect &bbox);
+/**
+ * Updates the arena shape 'item' and all of its children, including the markers.
+ */
static guint
nr_arena_shape_update(NRArenaItem *item, NRRectL *area, NRGC *gc, guint state, guint reset)
{
}
}
}
+
+/**
+ * Renders the item. Markers are just composed into the parent buffer.
+ */
static unsigned int
nr_arena_shape_render(NRArenaItem *item, NRRectL *area, NRPixBlock *pb, unsigned int flags)
{
diff --git a/src/doxygen-main.cpp b/src/doxygen-main.cpp
index f6d5e81f8b18832f4da43f580527dc96b0823eef..679706288267b5081b7b7959281892d31afe00e1 100644 (file)
--- a/src/doxygen-main.cpp
+++ b/src/doxygen-main.cpp
* - SPRoot [\ref sp-root.cpp, \ref sp-root.h]
* - SPSymbol [\ref sp-symbol.cpp, \ref sp-symbol.h]
* - SPImage [\ref sp-image.cpp, \ref sp-image.h]
- * - SPShape [\ref sp-shape.cpp, \ref sp-shape.h, \ref marker-status.cpp]
+ * - SPShape [\ref sp-shape.cpp, \ref sp-shape.h]
* - SPGenericEllipse [\ref sp-ellipse.cpp, \ref sp-ellipse.h]
* - SPArc
* - SPCircle
diff --git a/src/sp-shape.cpp b/src/sp-shape.cpp
index f72a0da340162c1efd4afa7666f2a3d9f35fe309..53f161470a196c9d83ef2ecc24f4d7180b5deb77 100644 (file)
--- a/src/sp-shape.cpp
+++ b/src/sp-shape.cpp
#include "display/nr-arena-shape.h"
#include "print.h"
#include "document.h"
-#include "marker-status.h"
#include "style.h"
#include "sp-marker.h"
#include "sp-path.h"
{
SPStyle *style = ((SPObject *) shape)->style;
- marker_status("sp_shape_update_marker_view: Updating views of markers");
-
for (int i = SP_MARKER_LOC_START; i < SP_MARKER_LOC_QTY; i++) {
if (shape->marker[i] == NULL) {
continue;
item = (SPItem *) shape;
- marker_status("sp_shape_marker_release: Releasing markers");
for (i = SP_MARKER_LOC_START; i < SP_MARKER_LOC_QTY; i++) {
if (marker == shape->marker[i]) {
SPItemView *v;
diff --git a/src/style.cpp b/src/style.cpp
index 8530e2bd4bd4ab1d21dadc9aaadbbaa3b4c41552..3fcc5a3388d6b45b6afd7b439f36b3f051a9568c 100644 (file)
--- a/src/style.cpp
+++ b/src/style.cpp
#include "attributes.h"
#include "document.h"
#include "extract-uri.h"
-#include "marker-status.h"
#include "uri-references.h"
#include "sp-paint-server.h"
#include "streq.h"
case SP_PROP_MARKER:
/* TODO: Call sp_uri_reference_resolve(SPDocument *document, guchar const *uri) */
/* style->marker[SP_MARKER_LOC] = g_quark_from_string(val); */
- marker_status("Setting SP_PROP_MARKER");
if (!style->marker[SP_MARKER_LOC].set) {
g_free(style->marker[SP_MARKER_LOC].value);
style->marker[SP_MARKER_LOC].value = g_strdup(val);
case SP_PROP_MARKER_START:
/* TODO: Call sp_uri_reference_resolve(SPDocument *document, guchar const *uri) */
- marker_status("Setting SP_PROP_MARKER_START");
if (!style->marker[SP_MARKER_LOC_START].set) {
g_free(style->marker[SP_MARKER_LOC_START].value);
style->marker[SP_MARKER_LOC_START].value = g_strdup(val);
break;
case SP_PROP_MARKER_MID:
/* TODO: Call sp_uri_reference_resolve(SPDocument *document, guchar const *uri) */
- marker_status("Setting SP_PROP_MARKER_MID");
if (!style->marker[SP_MARKER_LOC_MID].set) {
g_free(style->marker[SP_MARKER_LOC_MID].value);
style->marker[SP_MARKER_LOC_MID].value = g_strdup(val);
break;
case SP_PROP_MARKER_END:
/* TODO: Call sp_uri_reference_resolve(SPDocument *document, guchar const *uri) */
- marker_status("Setting SP_PROP_MARKER_END");
if (!style->marker[SP_MARKER_LOC_END].set) {
g_free(style->marker[SP_MARKER_LOC_END].value);
style->marker[SP_MARKER_LOC_END].value = g_strdup(val);
p += sp_style_write_ienum(p, c + BMAX - p, "stroke-linecap", enum_stroke_linecap, &style->stroke_linecap, NULL, flags);
p += sp_style_write_ienum(p, c + BMAX - p, "stroke-linejoin", enum_stroke_linejoin, &style->stroke_linejoin, NULL, flags);
- marker_status("sp_style_write_string: Writing markers");
if (style->marker[SP_MARKER_LOC].set) {
p += g_snprintf(p, c + BMAX - p, "marker:%s;", style->marker[SP_MARKER_LOC].value);
} else if (flags == SP_STYLE_FLAG_ALWAYS) {
p += sp_style_write_iscale24(p, c + BMAX - p, "stroke-opacity", &from->stroke_opacity, &to->stroke_opacity, SP_STYLE_FLAG_IFDIFF);
/* markers */
- marker_status("sp_style_write_difference: Writing markers");
if (from->marker[SP_MARKER_LOC].value != NULL) {
p += g_snprintf(p, c + BMAX - p, "marker:%s;", from->marker[SP_MARKER_LOC].value);
}