Mercurial > mercurial > hgweb_golang.cgi
view src/kaigo/horori/merger/src/utils.cpp @ 46:6ec28d3c3e00
small changes.
author | pyon@macmini |
---|---|
date | Sat, 18 Apr 2020 21:10:29 +0900 |
parents | 20b42e2deae1 |
children |
line wrap: on
line source
// Filename : utils.cpp // Last Change: 2020-03-18 15:01:12. // #include <wx/wx.h> #include "utils.h" wxRect Geo2Rect(wxString geo) { long w, h, x, y; wxString sw = geo.BeforeFirst('x'); wxString sh = geo.AfterFirst('x').BeforeFirst('+'); wxString sx = geo.AfterFirst('+').BeforeFirst('+'); wxString sy = geo.AfterLast('+'); sw.ToLong(&w, 10); sh.ToLong(&h, 10); sx.ToLong(&x, 10); sy.ToLong(&y, 10); return wxRect((int)x, (int)y, (int)w, (int)h); } wxRect ZeroRect() { wxRect rect(wxPoint(0, 0), wxPoint(0, 0)); return rect; }