ioa747 Posted 1 hour ago Posted 1 hour ago (edited) 16 minutes ago, jpm said: What is the effect of SmoothingModeNode is it equal to SmoothingModeDefault? To answer your question: (based on logic) technically, SmoothingModeNone and SmoothingModeDefault are not necessarily the same, although they often result in the same "aliased" visual output. SmoothingModeDefault (0): This tells GDI+ to use the system's default behavior. In most cases, this defaults to no smoothing (SmoothingModeNone), but it leaves room for the GDI+ engine to decide based on the context or global settings. SmoothingModeNone (3): This is an explicit instruction to disable all smoothing. It is a "forced" state. In the official MSDN documentation: SmoothingModeDefault is associated with QualityModeDefault. SmoothingModeNone is a distinct state meant to ensure no anti-aliasing is applied, regardless of any other default system settings. So, while the result for a user might look like "no smoothing" in both cases, SmoothingModeNone is the precise constant to use if you want to strictly enforce the absence of any anti-aliasing. https://learn.microsoft.com/en-us/windows/win32/api/gdiplusenums/ne-gdiplusenums-smoothingmode Edited 1 hour ago by ioa747 pixelsearch 1 I know that I know nothing
jpm Posted 1 hour ago Posted 1 hour ago Thanks, the doc you pointed show the same anyway I will update our doc saying no antialiasing for SmoothingModeNone pixelsearch and ioa747 2
jpm Posted 31 minutes ago Posted 31 minutes ago Now That the doc is clear I don't understand why the example display 1 as 2 is set Any idea
pixelsearch Posted 15 minutes ago Posted 15 minutes ago For the record, I don't know if _GDIPlus_GraphicsGetSmoothingMode needs to be revised or not : Help file : Return Value Success: the smoothing mode. Can be one of the following: 0 - Smoothing is not applied 1 - Smoothing is applied using an 8 X 4 box filter 2 - Smoothing is applied using an 8 X 8 box filter msdn in this link Return value Type: SmoothingMode If smoothing (antialiasing) is applied to this Graphics object, this method returns SmoothingModeAntiAlias. If smoothing (antialiasing) is not applied to this Graphics object, this method returns SmoothingModeNone. SmoothingModeAntiAlias and SmoothingModeNone are elements of the SmoothingMode enumeration. "I think you are searching a bug where there is no bug... don't listen to bad advice."
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now