-------- Forwarded Message --------
Subject:        Re: [Wxart2d-users_dev] Image display is opposite
Date:   Fri, 3 May 2024 10:45:50 -0300
From:   klaas.holwerda <i...@klaasholwerda.nl>
To:     wxart2d-users_dev@lists.sourceforge.net



Hi Shaul,

Are you using a a2dMemDcDrawer?
Can you run the zoom example?
The question is maybe more, what is right or wrong??
Clearly in part down here, I decided once, in the case of AggDrawer, that I wanted it to go along with the Yaxis, so not always up. I think my reasoning of doing it like this, is that when Yaxis changes, everything you see should be upside down, including images.

Currently it seems when Yaxis is negative, the image is drawn as in wxWidgets 
itself, meaning Up.

void a2dAggDrawer::DrawImage(  const wxImage& image, double x, double y, double width, double height, wxUint8 Opacity )
{
    if ( m_disableDrawing )
        return;
    int imagew = image.GetWidth();
    int imageh = image.GetHeight();

    agg::trans_affine mtxi;
    mtxi *= agg::trans_affine_scaling( width / imagew, height / imageh );
    mtxi *= agg::trans_affine_translation( x - width / 2, y - height / 2 );
    // pictures always upwards
    //if ( m_yaxis )
    //    mtxi *= agg::trans_affine_reflection_unit( 1, 0 );

But you are right, there were some heavy changes in the drawing context area, so it did change somewhere.
Do not know what is best, or maybe it should even become an option.

What is your opinion?
Regards,

Klaas



On 02/05/2024 12:34, Shaul Stavi wrote:
Hi,

In the current version the Image display is opposite.
in r963the image display was correct.

a2dImage *Image;
a2dCanvas* Canvas;
Image->GetImage().LoadFile( _T("c:\\test.bmp")  );
Image->Mirror();//not needed in version r963
Canvas->GetDrawing()->Append(Image);



_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

_______________________________________________
Wxart2d-users_dev mailing list
Wxart2d-users_dev@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxart2d-users_dev

Reply via email to