Graphics Library for D

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Wed Jan 8 12:49:53 PST 2014


On Wednesday, 8 January 2014 at 19:51:31 UTC, Adam Wilson wrote:
> Small meeting size probably also has to be with when and where 
> the meeting was. Beyond that, all I can say is that not being 
> part of standard is freeing in certain respects. Namely the

Yes, and also that they are less likely to invent something new, 
but will be told to just making existing practice formal.

Some discussions are worth looking at though. Like this 
discussion of pixel coordinates:

https://groups.google.com/a/isocpp.org/forum/?fromgroups#!topic/graphics/ZEIOhsJrrUQ

Personally, I think that allowing multiple graphics contexts to 
the same surface is the better approach, so that you can scale it 
to either be in the range ([0,1],[0,1]), ([-1,1],[-1,1]), 
([0,width],[0,height]), etc

e.g.:

g = surface.getContext().resetScaleNormalizedCenter(); // 
normalized to [-1,1]
gwh = surface.getContext().resetScaleWidthHeight(); // vertices 
in pixel coordinates
gretina = gwh.clone().scale(2,2); // vertices in points 
coordinates

g.plot(-1,-1); //upper left corner
gwh.plot(0,0); //upper left corner
etc.


More information about the Digitalmars-d mailing list