message: fixed drawing transformation matrix
diff: @@ -58,14 +58,15 @@ impl Transform {
  } => {
  // Calculate a matrix equivalent to doing this:
  // type Vec3 = na::Vector3<f32>;
  - // let translate = Matrix4::new_translation(&Vec3::new(self.dest.x, self.dest.y, 0.0));
  - // let offset = Matrix4::new_translation(&Vec3::new(self.offset.x, self.offset.y, 0.0));
  + // let o = offset;
  + // let translate = na::Matrix4::new_translation(&Vec3::new(dest.x, dest.y, 0.0));
  + // let offset = na::Matrix4::new_translation(&Vec3::new(offset.x, offset.y, 0.0));
  // let offset_inverse =
  - // Matrix4::new_translation(&Vec3::new(-self.offset.x, -self.offset.y, 0.0));
  - // let axis_angle = Vec3::z() * self.rotation;
  - // let rotation = Matrix4::new_rotation(axis_angle);
  - // let scale = Matrix4::new_nonuniform_scaling(&Vec3::new(self.scale.x, self.scale.y, 1.0));
  - // translate * offset * rotation * scale * offset_inverse
  + // na::Matrix4::new_translation(&Vec3::new(-o.x, -o.y, 0.0));
  + // let axis_angle = Vec3::z() * *rotation;
  + // let rotation = na::Matrix4::new_rotation(axis_angle);
  + // let scale = na::Matrix4::new_nonuniform_scaling(&Vec3::new(scale.x, scale.y, 1.0));
  + // translate * rotation * scale * offset_inverse
  //
  // Doing the bits manually is faster though, or at least was last I checked.
  let (sinr, cosr) = rotation.sin_cos();
  @@ -73,8 +74,8 @@ impl Transform {
  let m01 = -sinr * scale.y;
  let m10 = sinr * scale.x;
  let m11 = cosr * scale.y;
  - let m03 = offset.x * (1.0 - m00) - offset.y * m01 + dest.x;
  - let m13 = offset.y * (1.0 - m11) - offset.x * m10 + dest.y;
  + let m03 = offset.x * (-m00) - offset.y * m01 + dest.x;
  + let m13 = offset.y * (-m11) - offset.x * m10 + dest.y;
  // Welp, this transpose fixes some bug that makes nothing draw,
  // that was introduced in commit 2c6b3cc03f34fb240f4246f5a68c75bd85b60eae.
  // The best part is, I don't know if this code is wrong, or whether there's
  