347 } 348 relx = scrX + scrW / 2.0f - winfxCX; 349 rely = scrY + scrH / 2.0f - winfxCY; 350 float distsq2 = relx * relx + rely * rely; 351 if (distsq2 < distsq) { 352 screen = s; 353 distsq = distsq2; 354 } 355 } 356 } 357 } 358 float sx = screen == null ? 0 : screen.getX(); 359 float sy = screen == null ? 0 : screen.getY(); 360 float sScaleX = screen.getPlatformScaleX(); 361 float sScaleY = screen.getPlatformScaleY(); 362 px = xSet ? Math.round(screen.getPlatformX() + (x - sx) * sScaleX) : 0; 363 py = ySet ? Math.round(screen.getPlatformY() + (y - sy) * sScaleY) : 0; 364 } else { 365 px = py = 0; 366 } 367 int pw = (int) (w > 0 ? Math.ceil(w * pScaleX) : w); 368 int ph = (int) (h > 0 ? Math.ceil(h * pScaleY) : h); 369 int pcw = (int) (cw > 0 ? Math.ceil(cw * pScaleX) : cw); 370 int pch = (int) (ch > 0 ? Math.ceil(ch * pScaleY) : ch); 371 platformWindow.setBounds(px, py, xSet, ySet, 372 pw, ph, pcw, pch, 373 xGravity, yGravity); 374 } 375 376 @Override 377 public float getPlatformScaleX() { 378 return platformWindow.getPlatformScaleX(); 379 } 380 381 @Override 382 public float getPlatformScaleY() { 383 return platformWindow.getPlatformScaleY(); 384 } 385 386 @Override 387 public float getOutputScaleX() { 388 return platformWindow.getOutputScaleX(); 389 } 390 391 @Override 392 public float getOutputScaleY() { 393 return platformWindow.getOutputScaleY(); 394 } | 347 } 348 relx = scrX + scrW / 2.0f - winfxCX; 349 rely = scrY + scrH / 2.0f - winfxCY; 350 float distsq2 = relx * relx + rely * rely; 351 if (distsq2 < distsq) { 352 screen = s; 353 distsq = distsq2; 354 } 355 } 356 } 357 } 358 float sx = screen == null ? 0 : screen.getX(); 359 float sy = screen == null ? 0 : screen.getY(); 360 float sScaleX = screen.getPlatformScaleX(); 361 float sScaleY = screen.getPlatformScaleY(); 362 px = xSet ? Math.round(screen.getPlatformX() + (x - sx) * sScaleX) : 0; 363 py = ySet ? Math.round(screen.getPlatformY() + (y - sy) * sScaleY) : 0; 364 } else { 365 px = py = 0; 366 } 367 if (xSet || ySet || w > 0 || h > 0 || cw > 0 || ch > 0) { 368 int pw = (int) (w > 0 ? Math.ceil(w * pScaleX) : w); 369 int ph = (int) (h > 0 ? Math.ceil(h * pScaleY) : h); 370 int pcw = (int) (cw > 0 ? Math.ceil(cw * pScaleX) : cw); 371 int pch = (int) (ch > 0 ? Math.ceil(ch * pScaleY) : ch); 372 platformWindow.setBounds(px, py, xSet, ySet, 373 pw, ph, pcw, pch, 374 xGravity, yGravity); 375 } 376 } 377 378 @Override 379 public float getPlatformScaleX() { 380 return platformWindow.getPlatformScaleX(); 381 } 382 383 @Override 384 public float getPlatformScaleY() { 385 return platformWindow.getPlatformScaleY(); 386 } 387 388 @Override 389 public float getOutputScaleX() { 390 return platformWindow.getOutputScaleX(); 391 } 392 393 @Override 394 public float getOutputScaleY() { 395 return platformWindow.getOutputScaleY(); 396 } |