From 909019939a46e4aca09e5a00da0560a6c6b5f8bd Mon Sep 17 00:00:00 2001 From: David Hilvert Date: Sun, 1 Apr 2007 11:05:00 +0000 Subject: [PATCH] Modify handling of --identity in d2::align so that the element structure of multi-transformations is preserved. darcs-hash:20070401110535-d1b56-73844f16beefa7e1a6260d67f1c01dfd4711648b.gz --- d2/align.h | 3 ++- d2/trans_multi.h | 5 ++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/d2/align.h b/d2/align.h index dbc188b..45482e5 100644 --- a/d2/align.h +++ b/d2/align.h @@ -1557,7 +1557,8 @@ private: * setting new image dimensions. */ - element->default_initial_alignment = orig_t; + // element->default_initial_alignment = orig_t; + element->default_initial_alignment.set_current_element(orig_t.get_element(0)); element->default_initial_alignment.set_dimensions(input_frame); } else if (default_initial_alignment_type == 1) diff --git a/d2/trans_multi.h b/d2/trans_multi.h index b6b80bc..9d8cc07 100644 --- a/d2/trans_multi.h +++ b/d2/trans_multi.h @@ -51,12 +51,15 @@ public: return trans_stack[index]; } - trans_single set_element(unsigned int index, trans_single t) { + void set_element(unsigned int index, trans_single t) { assert (index < trans_stack.size()); trans_stack[index] = t; } + void set_current_element(trans_single t) { + trans_stack[trans_stack.size() - 1] = t; + } void push_element() { trans_stack.push_back(trans_stack.back()); -- 2.11.4.GIT