|
@@ -291,6 +291,24 @@ impl ObjectModifier {
|
|
|
self.default = 255.into();
|
|
|
self.modifiers.correction += delta;
|
|
|
}
|
|
|
+
|
|
|
+ pub fn correction(&self) -> Coordinate {
|
|
|
+ self.modifiers.correction
|
|
|
+ }
|
|
|
+
|
|
|
+ pub fn scale(&self) -> Coordinate {
|
|
|
+ Coordinate {
|
|
|
+ x: self.modifiers.x_scale,
|
|
|
+ y: self.modifiers.y_scale,
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ pub fn skew(&self) -> Coordinate {
|
|
|
+ Coordinate {
|
|
|
+ x: self.modifiers.x_skew,
|
|
|
+ y: self.modifiers.y_skew,
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
impl Default for ObjectModifier {
|
|
@@ -308,12 +326,12 @@ impl Default for ObjectModifier {
|
|
|
))]
|
|
|
pub struct ScaleValues {
|
|
|
pub x_scale: f64, // X scaled ratio on drawn object
|
|
|
- #[br(assert(_unknown_1 == 0.0))]
|
|
|
- _unknown_1: f64,
|
|
|
+ // #[br(assert(_unknown_1 == 0.0))]
|
|
|
+ pub x_skew: f64,
|
|
|
#[br(assert(_unknown_2 == 0.0))]
|
|
|
_unknown_2: f64,
|
|
|
- #[br(assert(_unknown_3 == 0.0))]
|
|
|
- _unknown_3: f64,
|
|
|
+ // #[br(assert(_unknown_3 == 0.0))]
|
|
|
+ pub y_skew: f64,
|
|
|
pub y_scale: f64, // Y scaled ratio on drawn object
|
|
|
#[br(assert(_unknown_4 == 0.0))]
|
|
|
_unknown_4: f64,
|
|
@@ -326,9 +344,9 @@ impl Default for ScaleValues {
|
|
|
fn default() -> Self {
|
|
|
Self {
|
|
|
x_scale: 1.0.into(),
|
|
|
- _unknown_1: 0.0.into(),
|
|
|
+ x_skew: 0.0.into(),
|
|
|
_unknown_2: 0.0.into(),
|
|
|
- _unknown_3: 0.0.into(),
|
|
|
+ y_skew: 0.0.into(),
|
|
|
y_scale: 1.0.into(),
|
|
|
_unknown_4: 0.0.into(),
|
|
|
correction: (0.0, 0.0).into(),
|
|
@@ -343,6 +361,8 @@ impl Debug for ScaleValues {
|
|
|
f.debug_struct("ScaleValues")
|
|
|
.field("x_scale", &self.x_scale)
|
|
|
.field("y_scale", &self.y_scale)
|
|
|
+ .field("x_skew", &self.x_skew)
|
|
|
+ .field("y_skew", &self.y_skew)
|
|
|
.field("correction", &self.correction)
|
|
|
.finish()
|
|
|
}
|