Changeset 1274 for cpp/common
- Timestamp:
- 09/09/23 15:12:57 (15 months ago)
- Location:
- cpp/common
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/common/2d.h
r1130 r1274 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-202 1Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2023 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 9 9 #include <algorithm> 10 10 11 //unification of old GUIXY and Pt2D12 11 template <typename T> class XY 13 12 { … … 174 173 } 175 174 175 XYRect fillAspect(float aspect) 176 { 177 XYRect r; 178 r.size = size; 179 if (size.x < size.y * aspect) 180 r.size.x = r.size.y * aspect; 181 else 182 r.size.y = r.size.x / aspect; 183 r.p = p + (size - r.size) * 0.5; 184 return r; 185 } 186 176 187 XYRect intersection(const XYRect &r) const 177 188 { -
cpp/common/Convert.cpp
r1130 r1274 155 155 wstring wstr; 156 156 int nOffset = 0; 157 int nDataLen = strlen(str); //ending \0 is not converted, but resize() below sets the proper length of wstr157 int nDataLen = (int)strlen(str); //ending \0 is not converted, but resize() below sets the proper length of wstr 158 158 int nLenWide = MultiByteToWideChar(CP_UTF8, 0, (LPCSTR)(str + nOffset), 159 159 (int)(nDataLen - nOffset), NULL, 0);
Note: See TracChangeset
for help on using the changeset viewer.