Home Notices Documents Classes Download Others Rice
Classes  >  window  >  PointToScreen(real or int,real or int)
window class : PointToScreen(real or int,real or int) method

Description

Converts the client coordinates on the window to the screen coordinates. In device independent pixel.

Syntax

windowInstance.PointToScreen(real or int dipX, real or int dipY)

Arguments

ClassNameDescription
real or intdipXx-coordinate of the client coordinates. In device independent pixel.
real or intdipYy-coordinate of the client coordinates. In device independent pixel.

Return value

None

Sample code

1:

window w = new window();

2:

real x = 100.0;

3:

real y = 100.0;

4:

w.PointToScreen(x, y);//The individual conversion values are stored in the arguments after the execution.

Notes

It's a wrapper of the System.Windows.Media.Visual.PointToScreen(Point) method.

The client coordinates on the window which is passed by the arguments will be converted to screen coordinates.

Please set logical pixels values to arguments.

The converted value is stored in the argument and returned. The conversion value is also a logical pixels value.

In Ver 1.0.0.1, the arguments ware modified to be able to pass both real and int. However, the class of the two arguments must be the same.

The logical pixels is the device independent pixels (DIP).


How to convert from physical pixels to logical pixels is follows.

Horizontal : physical pixels / DpiScaleFactorX = logical pixels

Vertical : physical pixels / DpiScaleFactorY = logical pixels

How to convert from logical pixels to physical pixels is follows.

Horizontal : logical pixels * DpiScaleFactorX = physical pixels

Vertical : logical pixels * DpiScaleFactorY = physical pixels

Links for reference

Copyright © Rice All rights reserved.