mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 06:50:48 +00:00
Add base/screen conversion
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@4377 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
39037c2c7f
commit
67beb8dac4
4 changed files with 24 additions and 1 deletions
|
@ -662,13 +662,14 @@ static Class responderClass;
|
|||
screenPoint.x = frame.origin.x + basePoint.x;
|
||||
screenPoint.y = frame.origin.y + basePoint.y;
|
||||
|
||||
return screenPoint;
|
||||
return [GSCurrentContext() convertBaseToScreen: screenPoint];
|
||||
}
|
||||
|
||||
- (NSPoint) convertScreenToBase: (NSPoint)screenPoint
|
||||
{
|
||||
NSPoint basePoint;
|
||||
|
||||
screenPoint = [GSCurrentContext() convertScreenToBase: screenPoint]
|
||||
basePoint.x = screenPoint.x - frame.origin.x;
|
||||
basePoint.y = screenPoint.y - frame.origin.y;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue