From 9c129741d4773f28ff07a34eeadb3ade5d87323e Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Sun, 21 Feb 2016 17:20:33 -0500 Subject: [PATCH] Update README.md --- README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/README.md b/README.md index ddcad5a..a873ffe 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,8 @@ StrokePreserve() FillPreserve() ``` +It is often desired to center an image at a point. Use `DrawImageAnchored` with `ax` and `ay` set to 0.5 to do this. Use 0 to left or top align. Use 1 to right or bottom align. `DrawStringAnchored` does the same for text, so you don't need to call `MeasureString` yourself. + ## Text Functions ```go @@ -113,6 +115,10 @@ TransformPoint(x, y float64) (tx, ty float64) InvertY() ``` +It is often desired to rotate or scale about a point that is not the origin. The functions `RotateAbout`, `ScaleAbout`, `ShearAbout` are provided as a convenience. + +`InvertY` is provided in case Y should increase from bottom to top vs. the default top to bottom. + Note: transforms do not currently affect `DrawImage` or `DrawString`. ## Stack Functions