Uranium
Application Framework
Loading...
Searching...
No Matches
UM.Operations.ScaleToBoundsOperation.ScaleToBoundsOperation Class Reference

Operation subclass that will scale a node to fit within the bounds provided. More...

Inheritance diagram for UM.Operations.ScaleToBoundsOperation.ScaleToBoundsOperation:
UM.Operations.Operation.Operation

Public Member Functions

 __init__ (self, node, bounds)
 Creates a new operation that scales a nodes to the bounds.
 
 undo (self)
 Undoes the scale to bounds, restoring the old scale.
 
 redo (self)
 Re-applies the scale to bounds after it has been undone.
 
- Public Member Functions inherited from UM.Operations.Operation.Operation
 __init__ (self)
 
 undo (self)
 Undo the operation.
 
 redo (self)
 Redo the operation.
 
 mergeWith (self, other)
 Perform operation merging.
 
 push (self)
 Push the operation onto the stack.
 

Protected Attributes

 _node
 
 _old_scale
 
 _new_scale
 
- Protected Attributes inherited from UM.Operations.Operation.Operation
 _timestamp
 
 _always_merge
 

Detailed Description

Operation subclass that will scale a node to fit within the bounds provided.

Constructor & Destructor Documentation

◆ __init__()

UM.Operations.ScaleToBoundsOperation.ScaleToBoundsOperation.__init__ (   self,
  node,
  bounds 
)

Creates a new operation that scales a nodes to the bounds.

Parameters
nodeThe node to scale to the bounds.
boundsThe bounding box to scale the node to.

Reimplemented from UM.Operations.Operation.Operation.

Member Function Documentation

◆ redo()

UM.Operations.ScaleToBoundsOperation.ScaleToBoundsOperation.redo (   self)

Re-applies the scale to bounds after it has been undone.

Reimplemented from UM.Operations.Operation.Operation.

◆ undo()

UM.Operations.ScaleToBoundsOperation.ScaleToBoundsOperation.undo (   self)

Undoes the scale to bounds, restoring the old scale.

Reimplemented from UM.Operations.Operation.Operation.


The documentation for this class was generated from the following file: