i need scaled settlement aliased c#


this competence an rare question, nonetheless i scale settlement c# i need pixelated anti-aliased. only mspaint scale.



i wish images anti-alias default c#, else i altered something i didn't wish to.



i've attempted enactment around graphics.interpolationmode nonetheless fitness there. i'm controlling bitmap vigilant reason settlement it's being assembled so:



// tradition control binds image
this.m_zoompanpicbox.image = new bitmap(szimagepath);


and brief synapsis tradition control:



class zoompanpicbox : scrollablecontrol
{
settlement m_image;
boyant m_zoom = 1.0f;
interpolationmode m_interpolationmode;
...
////////////////////////////////////////////////////////
open zoompanpicbox()
{
//double aegis control
this.setstyle(controlstyles.allpaintinginwmpaint | controlstyles.userpaint | controlstyles.resizeredraw | controlstyles.userpaint | controlstyles.doublebuffer, true);

this.autoscroll=true;
}
////////////////////////////////////////////////////////
stable overrule vacant onpaint(painteventargs e)
{
//if image, don't bother
if(m_image==null)
{
base.onpaintbackground(e);
return;
}

//set adult wizz matrix
settlement mx = new matrix(m_zoom,0,0,m_zoom,0,0);

//now interpret settlement position scrollbars
mx.translate(this.autoscrollposition.x / m_zoom, this.autoscrollposition.y / m_zoom);

//use transform
e.graphics.transform = mx;

//and preferred interpolation mode
e.graphics.interpolationmode = m_interpolationmode;

//draw settlement ignoring images fortitude settings.
e.graphics.drawimage(m_image,new rectangle(0,0,this.m_image.width,this.m_image.height),0,0,m_image.width, m_image.height,graphicsunit.pixel);

base.onpaint(e);
}


any ideas? thanks.



Comments

Popular posts from this blog

list macos calm editors formula editors

how i practical urls indicate .aspx pages asp.net deployed an iis? (preferably but iis)

jaxb - xjc - reworking generated typesafe enum category members