fix deprecated warning

This commit is contained in:
lsv 2024-02-06 08:34:42 +05:00
parent f8b017ad45
commit 2d7ac600c0
25 changed files with 402 additions and 405 deletions

View file

@ -527,14 +527,14 @@ bool wxXMetaFile::ReadFile(const wxChar *file)
getshort(handle); // Y: 2 bytes
long colorref = getint(handle); // COLORREF 4 bytes
int style;
wxPenStyle style;
if (msStyle == PS_DOT)
style = wxDOT;
style = wxPENSTYLE_DOT;
else if (msStyle == PS_DASH)
style = wxSHORT_DASH;
style = wxPENSTYLE_SHORT_DASH;
else if (msStyle == PS_NULL)
style = wxTRANSPARENT;
else style = wxSOLID;
style = wxPENSTYLE_TRANSPARENT;
else style = wxPENSTYLE_SOLID;
wxColour colour(GetRValue(colorref), GetGValue(colorref), GetBValue(colorref));
rec->param1 = (long)wxThePenList->FindOrCreatePen(colour, x, style);
@ -582,34 +582,34 @@ bool wxXMetaFile::ReadFile(const wxChar *file)
// header)
fread((void *)lfFacename, sizeof(char), (int)((2 * rdSize) - 18 - 6), handle);
int family;
wxFontFamily family;
if (lfPitchAndFamily & FF_MODERN)
family = wxMODERN;
family = wxFONTFAMILY_MODERN;
else if (lfPitchAndFamily & FF_MODERN)
family = wxMODERN;
family = wxFONTFAMILY_MODERN;
else if (lfPitchAndFamily & FF_ROMAN)
family = wxROMAN;
family = wxFONTFAMILY_ROMAN;
else if (lfPitchAndFamily & FF_SWISS)
family = wxSWISS;
family = wxFONTFAMILY_SWISS;
else if (lfPitchAndFamily & FF_DECORATIVE)
family = wxDECORATIVE;
family = wxFONTFAMILY_DECORATIVE;
else
family = wxDEFAULT;
family = wxFONTFAMILY_DEFAULT;
int weight;
wxFontWeight weight;
if (lfWeight == 300)
weight = wxLIGHT;
weight = wxFONTWEIGHT_LIGHT;
else if (lfWeight == 400)
weight = wxNORMAL;
weight = wxFONTWEIGHT_NORMAL;
else if (lfWeight == 900)
weight = wxBOLD;
else weight = wxNORMAL;
weight = wxFONTWEIGHT_BOLD;
else weight = wxFONTWEIGHT_NORMAL;
int style;
wxFontStyle style;
if (lfItalic != 0)
style = wxITALIC;
style = wxFONTSTYLE_ITALIC;
else
style = wxNORMAL;
style = wxFONTSTYLE_NORMAL;
// About how many pixels per inch???
int logPixelsY = 100;
@ -663,16 +663,16 @@ bool wxXMetaFile::ReadFile(const wxChar *file)
}
case BS_SOLID:
default:
style = wxSOLID;
style = wxBRUSHSTYLE_SOLID;
break;
}
if (msStyle == PS_DOT)
style = wxDOT;
style = wxPENSTYLE_DOT;
else if (msStyle == PS_DASH)
style = wxSHORT_DASH;
style = wxPENSTYLE_SHORT_DASH;
else if (msStyle == PS_NULL)
style = wxTRANSPARENT;
else style = wxSOLID;
style = wxPENSTYLE_TRANSPARENT;
else style = wxPENSTYLE_SOLID;
wxColour colour(GetRValue(colorref), GetGValue(colorref), GetBValue(colorref));
rec->param1 = (long)wxTheBrushList->FindOrCreateBrush(colour, style);