File tree 4 files changed +21
-2
lines changed
4 files changed +21
-2
lines changed Original file line number Diff line number Diff line change @@ -74,5 +74,17 @@ RowOrder Frame::determineRowOrder() const
74
74
75
75
return frameRowOrder;
76
76
}
77
+
78
+ std::map<uint8_t , QSize> Frame::computeChannelDimensions () const
79
+ {
80
+ std::map<uint8_t , QSize> sizes;
81
+ for (const auto & tile : tiles)
82
+ {
83
+ auto & size = sizes[tile.channel ];
84
+ size.setWidth (std::max (size.width (), (int )(tile.width + tile.x )));
85
+ size.setHeight (std::max (size.height (), (int )(tile.height + tile.y )));
86
+ }
87
+ return sizes;
88
+ }
77
89
}
78
90
}
Original file line number Diff line number Diff line change 46
46
#include < QSize>
47
47
#include < QString>
48
48
49
+ #include < map>
50
+
49
51
namespace deflect
50
52
{
51
53
namespace server
@@ -64,6 +66,9 @@ struct Frame
64
66
/* * @return the total dimensions of the given channel of this frame. */
65
67
DEFLECT_API QSize computeDimensions (const uint8_t channel = 0 ) const ;
66
68
69
+ /* * @return the total dimensions of all channels of this frame. */
70
+ DEFLECT_API std::map<uint8_t , QSize> computeChannelDimensions () const ;
71
+
67
72
/* *
68
73
* @return the row order of all frame tiles.
69
74
* @throws std::runtime_error if not all tiles have the same RowOrder.
Original file line number Diff line number Diff line change @@ -75,9 +75,9 @@ class FrameDispatcher::Impl
75
75
76
76
void mirrorTilesPositionsVertically (Frame& frame) const
77
77
{
78
- const auto height = frame.computeDimensions (). height ();
78
+ const auto sizes = frame.computeChannelDimensions ();
79
79
for (auto & tile : frame.tiles )
80
- tile.y = height - tile.y - tile.height ;
80
+ tile.y = sizes. at (tile. channel ). height () - tile.y - tile.height ;
81
81
}
82
82
83
83
bool allConnectionsClosed (const QString& uri) const
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ Changelog {#Changelog}
4
4
## Deflect 1.0
5
5
6
6
### 1.0.1 (master)
7
+ * [ 207] ( https://github.com/BlueBrain/Deflect/pull/207 ) :
8
+ Fix wrong vertical frame mirror for different sized channels
7
9
* [ 203] ( https://github.com/BlueBrain/Deflect/pull/203 ) :
8
10
QmlStreamer resizes the window only if the received size event is within the
9
11
specified min/max size hints.
You can’t perform that action at this time.
0 commit comments