Positioning fixes for RTL floats

This commit is contained in:
Matt Brubeck 2015-05-18 16:50:51 -07:00
parent ec5c333347
commit 0048b4f2ab
6 changed files with 52 additions and 4 deletions

View file

@ -919,6 +919,13 @@ impl<T: Copy + Add<T, Output=T> + Sub<T, Output=T>> LogicalRect<T> {
}
}
pub fn translate_by_size(&self, offset: LogicalSize<T>) -> LogicalRect<T> {
LogicalRect {
start: self.start + offset,
..*self
}
}
pub fn translate(&self, offset: &LogicalPoint<T>) -> LogicalRect<T> {
LogicalRect {
start: self.start + LogicalSize {