mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 16:30:53 +00:00
* Source/NSScreen.m: Use -userSpaceScaleFactor to calculate
NSDeviceResolution * Source/NSImage.m: Implement -_bestRep:withResolutionMatch: * Images/common_Dimple.tiff: * Images/common_3DArrowRight.tiff: Add to these images a second 'page' at 4x the original resolution which I drew. If you use GSScaleFactor > 1 then the high resolution version of these images should be used. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32975 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7afbe7b2bd
commit
99bd5d4243
5 changed files with 84 additions and 27 deletions
|
@ -274,7 +274,7 @@ static NSMutableArray *screenArray = nil;
|
|||
int bps = 0;
|
||||
NSSize screenResolution;
|
||||
NSString *colorSpaceName = nil;
|
||||
GSDisplayServer *srv;
|
||||
CGFloat scaleFactor;
|
||||
|
||||
/*
|
||||
* This method generates a dictionary from the
|
||||
|
@ -294,13 +294,10 @@ static NSMutableArray *screenArray = nil;
|
|||
forKey: NSDeviceSize];
|
||||
|
||||
// Add the NSDeviceResolution dictionary item
|
||||
srv = GSCurrentServer();
|
||||
if (srv != nil)
|
||||
{
|
||||
screenResolution = [srv resolutionForScreen: _screenNumber];
|
||||
[devDesc setObject: [NSValue valueWithSize: screenResolution]
|
||||
forKey: NSDeviceResolution];
|
||||
}
|
||||
scaleFactor = [self userSpaceScaleFactor];
|
||||
screenResolution = NSMakeSize(72.0 * scaleFactor, 72.0 * scaleFactor);
|
||||
[devDesc setObject: [NSValue valueWithSize: screenResolution]
|
||||
forKey: NSDeviceResolution];
|
||||
|
||||
// Add the bits per sample entry
|
||||
bps = NSBitsPerSampleFromDepth(_depth);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue