Home > Software engineering >  AlphaBlend function scaling of sawtooth question, give advice or comments please!!!!!!
AlphaBlend function scaling of sawtooth question, give advice or comments please!!!!!!

Time:01-23

AlphaBlend function (HDC hdcDest, int nXOriginDest, int nYOriginDest, int nWidthDest, int hHeightDest, HDC hdcSrc, int nXOriginSrc, int nYOriginSrc, int nWidthSrc, int nHeightSrc, BLENDFUNCTION BLENDFUNCTION);


When nWidthDest hHeightDest is not equal to nWidthSrc, int nHeightSrc scaling occurs, namely is serrated, this how to modify, I can't see there are ways to set the zoom algorithm,

The CDC: : SetStretchBltMode STRETCH_HALFTONE

CodePudding user response:

GdiAlphaBlend function
See the comments section
If the source rectangle and destination rectangle are not the same size, and the source bitmap is stretched to match the destination rectangle. If the SetStretchBltMode function is 2, the iStretchMode value is automatically converted to COLORONCOLOR for this function (that is, BLACKONWHITE, WHITEONBLACK, and HALFTONE are changed to COLORONCOLOR).

Therefore SetStretchBltMode should be able to effectively




CodePudding user response:

Didn't work, If the SetStretchBltMode function is 2, the iStretchMode value is automatically converted to COLORONCOLOR for this function (that is, BLACKONWHITE, WHITEONBLACK, and HALFTONE are changed to COLORONCOLOR), the meaning of this sentence is said that the function will force COLORONCOLOR this way of interpolation,
  • Related