agg::trans_viewport

> 1/ does the algorithm works only from0,0 to frame_width,frame_height ?

> Is there a way to define a "worldcoordinate system" different than the

> "renderer coordinate system"(let's say rendering lines bounded between

> -100,-100 100,100 in a 100x100 buffer,without translating/rescaling all

> the coordinates of my lines).

> I've found the agg::conv_transform andagg::conv_curve classes. Is that

> the way to go ?

 

It's done by trans_viewport, seeagg_trans_viewport.h

You can use a separate converter:

agg::trans_viewport vp;

. . .

agg::conv_transform<your_pipeline_type,

   agg::trans_viewport>conv_vp(your_pipeline, vp);

 

Or you can add it to the affinetransformer:

 

agg::trans_viewport vp;

agg::trans_affine affine;

. . .

. . .// Create affine matrix

. . .// Initialize viewport;

affine *= vp.to_affine();

 

agg::conv_transform<your_pipeline_type>

  conv_trans(your_pipeline, affine);


你可能感兴趣的:(viewport,agg,agg::trans)