tree: add Node::node_output
This commit is contained in:
parent
0dcb33ae38
commit
b83bf0657b
15 changed files with 65 additions and 7 deletions
|
|
@ -600,12 +600,16 @@ impl ToplevelData {
|
|||
}
|
||||
|
||||
pub fn output(&self) -> Rc<OutputNode> {
|
||||
match self.workspace.get() {
|
||||
match self.output_opt() {
|
||||
None => self.state.dummy_output.get().unwrap(),
|
||||
Some(ws) => ws.output.get(),
|
||||
Some(o) => o,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn output_opt(&self) -> Option<Rc<OutputNode>> {
|
||||
self.workspace.get().map(|ws| ws.output.get())
|
||||
}
|
||||
|
||||
pub fn desired_pixel_size(&self) -> (i32, i32) {
|
||||
let (dw, dh) = self.desired_extents.get().size();
|
||||
if let Some(ws) = self.workspace.get() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue