Jump to content

Recommended Posts

Posted (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 by ioa747

I know that I know nothing

Posted

Now That the doc is clear

I don't understand why the example display 1 as 2 is set

Any idea

Posted

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."

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...