Changeset 1130 for cpp/frams/canvas/neurodiagram.cpp
- Timestamp:
- 04/16/21 15:55:34 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/canvas/neurodiagram.cpp
r973 r1130 1 1 // This file is a part of Framsticks SDK. http://www.framsticks.com/ 2 // Copyright (C) 1999-202 0Maciej Komosinski and Szymon Ulatowski.2 // Copyright (C) 1999-2021 Maciej Komosinski and Szymon Ulatowski. 3 3 // See LICENSE.txt for details. 4 4 … … 13 13 #include <frams/simul/simul.h> 14 14 #include "common/nonstd_time.h" 15 #include <algorithm> 15 16 16 17 #define FIELDSTRUCT NeuroDiagram … … 231 232 NeuroProbe *probe = new NeuroProbe(getNS(i)); 232 233 Pixel s = getSize(); 233 s.x = s.y = max(probe->getSize().x,min(s.x / 3, s.y / 3));234 s.x = s.y = std::max(probe->getSize().x, std::min(s.x / 3, s.y / 3)); 234 235 probes += (void*)probe; 235 236 add(probe); … … 503 504 int *dr = drawing; 504 505 int w = size.x - 2, h = size.y - clienttop - clientbottom; 505 int scale = min(w, h);506 int scale = std::min(w, h); 506 507 int x0 = clienttop + leftborder + ((w > h) ? (w - h) / 2 : 0); 507 508 int y0 = clientleft + topborder + ((h > w) ? (h - w) / 2 : 0);
Note: See TracChangeset
for help on using the changeset viewer.