alinebee / Boxer

The DOS game emulator that's fit for your Mac.
http://boxerapp.com/
770 stars 139 forks source link

Implementing alignRectanglesWithAlignment() in ADBGeometry. #23

Closed JanX2 closed 10 years ago

JanX2 commented 10 years ago

Hi Alun!

I couldn’t find a separate repo for ADBToolkit so I had to fork Boxer. What do you think about moving ADBToolkit to its own repo?

Cheers, Jan

alinebee commented 10 years ago

You may want to look at the NSImage+ADBImageEffects.h category: This has methods for calculating an image's draw rect using the NSImageAlignment constants, and for converting an NSImageAlignment constant to a relative anchor.

I wouldn't merge this change as-is using new constants, since the NSImageAlignment constants already cover the same ground as these new ones, and represent the most common use-case for this kind of rect alignment.

alinebee commented 10 years ago

I do intend to migrate ADBToolkit to its own repo once it's more generalised and mature, but at the moment it's mainly full of stuff that suits Boxer rather than a broad range of projects; and it's easier for me to leave it as part of Boxer for now rather than juggling submodules and external projects. The more broadly applicable stuff (OpenGL, filesystems, disk-image parsing) is still woefully incomplete at the moment.

(Sorry for these comments originally appearing on your commit itself - I typed them into the wrong window.)

JanX2 commented 10 years ago

Great! Thanks for NSImageAlignment tip!