Add cropping
This commit is contained in:
parent
4c2b72e0f9
commit
6867e0b13f
19 changed files with 1414 additions and 52 deletions
|
|
@ -104,16 +104,15 @@ impl imp::LpImage {
|
|||
}
|
||||
|
||||
fn horizontal_bar(&self) -> f64 {
|
||||
f64::max(
|
||||
0.,
|
||||
(self.widget_width() - self.image_displayed_width()) / 2.,
|
||||
)
|
||||
let obj = self.obj();
|
||||
f64::max(0., (self.widget_width() - obj.image_displayed_width()) / 2.)
|
||||
}
|
||||
|
||||
fn vertical_bar(&self) -> f64 {
|
||||
let obj = self.obj();
|
||||
f64::max(
|
||||
0.,
|
||||
(self.widget_height() - self.image_displayed_height()) / 2.,
|
||||
(self.widget_height() - obj.image_displayed_height()) / 2.,
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue