MCPcopy Create free account
hub / github.com/Kitware/VTK / SetSize

Method SetSize

Rendering/UI/vtkWin32HardwareWindow.cxx:183–213  ·  view source on GitHub ↗

----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

181
182// ----------------------------------------------------------------------------
183void vtkWin32HardwareWindow::SetSize(int x, int y)
184{
185 static bool resizing = false;
186 if ((this->Size[0] != x) || (this->Size[1] != y))
187 {
188 this->Superclass::SetSize(x, y);
189
190 if (!this->UseOffScreenBuffers)
191 {
192 if (!resizing)
193 {
194 resizing = true;
195
196 if (this->ParentId)
197 {
198 SetWindowExtEx(GetDC(this->WindowId), x, y, nullptr);
199 SetViewportExtEx(GetDC(this->WindowId), x, y, nullptr);
200 SetWindowPos(this->WindowId, HWND_TOP, 0, 0, x, y, SWP_NOMOVE | SWP_NOZORDER);
201 }
202 else
203 {
204 RECT r;
205 AdjustWindowRectForBorders(this->WindowId, 0, 0, 0, x, y, r);
206 SetWindowPos(this->WindowId, HWND_TOP, 0, 0, r.right - r.left, r.bottom - r.top,
207 SWP_NOMOVE | SWP_NOZORDER);
208 }
209 resizing = false;
210 }
211 }
212 }
213}
214
215void vtkWin32HardwareWindow::SetPosition(int x, int y)
216{

Callers 2

InitializeMethod · 0.45
UpdateSizeMethod · 0.45

Calls 1

Tested by

no test coverage detected