geo icon indicating copy to clipboard operation
geo copied to clipboard

Implement getter methods on AffineTransform to access internal elements

Open weiji14 opened this issue 11 months ago • 1 comments

Enable internal elements of the affine transform matrix to be retrieved using getter methods. Included some short documentation and a unit test.

Example usage:

use geo::AffineTransform;

let transform = AffineTransform::new(10.0, 0.0, 400_000.0, 0.0, -10.0, 500_000.0);

let a: f64 = transform.a();
let b: f64 = transform.b();
let xoff: f64 = transform.xoff();
let d: f64 = transform.d();
let e: f64 = transform.e();
let yoff: f64 = transform.yoff();

assert_eq!(transform, AffineTransform::new(a, b, xoff, d, e, yoff))

  • [x] I agree to follow the project's code of conduct.
  • [x] I added an entry to CHANGES.md if knowledge of this change could be valuable to users.

Fixes #1158

weiji14 avatar Mar 12 '24 02:03 weiji14

I personally prefer methods (getters) instead of Index.

lnicola avatar Mar 12 '24 09:03 lnicola

Anything else I can do to move this PR along?

weiji14 avatar May 07 '24 23:05 weiji14