Functions for finding our information about the environment.
More...
Functions for finding our information about the environment.
◆ jmonitor_getdisplayrect()
void jmonitor_getdisplayrect |
( |
long |
workarea, |
|
|
long |
displayindex, |
|
|
t_rect * |
rect |
|
) |
| |
Return the t_rect for a given display.
- Parameters
-
workarea | Set workarea non-zero to clip out things like dock / task bar. |
displayindex | The index number for a monitor. The primary monitor has an index of 0. |
rect | The address of a valid t_rect whose values will be filled-in upon return. |
◆ jmonitor_getdisplayrect_foralldisplays()
void jmonitor_getdisplayrect_foralldisplays |
( |
long |
workarea, |
|
|
t_rect * |
rect |
|
) |
| |
Return a union of all display rects.
- Parameters
-
workarea | Set workarea non-zero to clip out things like dock / task bar. |
rect | The address of a valid t_rect whose values will be filled-in upon return. |
◆ jmonitor_getdisplayrect_forpoint()
void jmonitor_getdisplayrect_forpoint |
( |
long |
workarea, |
|
|
t_pt |
pt, |
|
|
t_rect * |
rect |
|
) |
| |
Return the t_rect for the display on which a point exists.
- Parameters
-
workarea | Set workarea non-zero to clip out things like dock / task bar. |
pt | A point, for which the monitor will be determined and the rect recturned. |
rect | The address of a valid t_rect whose values will be filled-in upon return. |
◆ jmonitor_getdisplayscalefactor()
double jmonitor_getdisplayscalefactor |
( |
long |
displayindex | ) |
|
Return the scale factor for the display on which a point exists.
- Parameters
-
displayindex | Index of the monitor whose scale factor will be returned. |
◆ jmonitor_getdisplayscalefactor_forpoint()
double jmonitor_getdisplayscalefactor_forpoint |
( |
t_pt |
pt | ) |
|
Return the scale factor for the display on which a point exists.
- Parameters
-
pt | A point, for which the monitor will be determined and the scale factor recturned. |
◆ jmonitor_getnumdisplays()
long jmonitor_getnumdisplays |
( |
void |
| ) |
|
Return the number of monitors on which can be displayed.
- Returns
- The number of monitors.
◆ jmonitor_scale_pt()
t_pt jmonitor_scale_pt |
( |
t_pt |
unscaled_pt | ) |
|
take an unscaled point and convert it to a scaled point note – most APIs take scaled coordinates so drawing doesn't need to consider scale factor for each monitor
- Parameters
-
unscaled_pt | the point to be scaled, should be in pixels on the global "virtual" screen consisting of all monitors |
- Returns
- pointer to receive the scaled point, scaled to normalize based on various scale factors and monitor arrangement
◆ jmonitor_unscale_pt()
t_pt jmonitor_unscale_pt |
( |
t_pt |
scaled_pt | ) |
|
take an unscaled point and convert it to a scaled point note – most APIs take scaled coordinates so drawing doesn't need to consider scale factor for each monitor
- Parameters
-
scaled_pt | the point to be unscaled, should be in normalized coordinates, scaled based on scale factors and monitor arrangement |
- Returns
- pointer to receive the unscaled point, which will be pixel-based coordinates relative to the main monitor origin