comparison Framework/Scene2D/TextSceneLayer.cpp @ 949:32eaf4929b08 toa2019081301

OrthancMultiframeVolumeLoader and OrthancSeriesVolumeProgressiveLoader now implement IGeometryProvider so that the geometry reference can be switched (CT or DOSE, for instance) + VolumeImageGeometry::SetSize renamed to VolumeImageGeometry::SetSizeInVoxels + prevent text layer update if text or properties do not change + a few stream operator<< for debug (Vector, Matrix,...) + fixed memory access aligment issues in ImageBuffer3D::ExtractSagittalSlice + fix for wrong screen Y offset of mpr slices in DicomVolumeImageMPRSlicer.
author Benjamin Golinvaux <bgo@osimis.io>
date Tue, 13 Aug 2019 16:01:05 +0200
parents 61ba4b504e9a
children 2d8ab34c8c91
comparison
equal deleted inserted replaced
948:141cc19e6b7d 949:32eaf4929b08
48 } 48 }
49 49
50 void TextSceneLayer::SetPosition(double x, 50 void TextSceneLayer::SetPosition(double x,
51 double y) 51 double y)
52 { 52 {
53 x_ = x; 53 if (x != x_ || y != y_)
54 y_ = y; 54 {
55 revision_ ++; 55 x_ = x;
56 y_ = y;
57 revision_++;
58 }
56 } 59 }
57 60
58 void TextSceneLayer::SetText(const std::string& utf8) 61 void TextSceneLayer::SetText(const std::string& utf8)
59 { 62 {
60 utf8_ = utf8; 63 if (utf8 != utf8_)
61 revision_ ++; 64 {
65 utf8_ = utf8;
66 revision_++;
67 }
62 } 68 }
63 69
64 void TextSceneLayer::SetFontIndex(size_t fontIndex) 70 void TextSceneLayer::SetFontIndex(size_t fontIndex)
65 { 71 {
66 fontIndex_ = fontIndex; 72 if (fontIndex != fontIndex_)
67 revision_ ++; 73 {
74 fontIndex_ = fontIndex;
75 revision_++;
76 }
68 } 77 }
69 78
70 void TextSceneLayer::SetAnchor(BitmapAnchor anchor) 79 void TextSceneLayer::SetAnchor(BitmapAnchor anchor)
71 { 80 {
72 anchor_ = anchor; 81 if (anchor != anchor_)
73 revision_ ++; 82 {
83 anchor_ = anchor;
84 revision_++;
85 }
74 } 86 }
75 87
76 void TextSceneLayer::SetBorder(unsigned int border) 88 void TextSceneLayer::SetBorder(unsigned int border)
77 { 89 {
78 border_ = border; 90 if (border != border_)
79 revision_ ++; 91 {
92 border_ = border;
93 revision_++;
94 }
80 } 95 }
81 } 96 }