* Source/NSImage.m (-TIFFRepresentation)
(TIFFRepresentationUsingCompression:factor:): Pass on bitmaps
only.
* Source/NSBitmapImageRep.m: Implement methods to generate tiff
for multiple bitmaps.
* Source/tiff.m: Fix long standing bug in TiffHandleSeek.
In NSTiffWrite write image tiff directory to allow for multiple
images.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@39050 72102866-910b-0410-8b05-ffd578937521
Patch by Johannes Lundberg <johannes@brilliantservice.co.jp>.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@37518 72102866-910b-0410-8b05-ffd578937521
Theme bundles that contain theme images named using either GNUstep or
OPENSTEP names now work properly again (bug introduced in r36836).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36916 72102866-910b-0410-8b05-ffd578937521
* Source/NSImage.m: Revert previous commit and write a much cleaner
implementation that fixes the same bug.
I removed the step in theme activation where we call
+[NSImage _setImagePath:name:] on each image in the theme, and instead
modified +[NSImage _pathForImageNamed:] to also search the theme images
directory.
When a GSTheme activates now, it only calls +[NSImage _reloadCachedImages]
which checks all NSImage cached by name and reloads any whose path has
changed.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36482 72102866-910b-0410-8b05-ffd578937521
common_3DArrowRight and have images that map to it (NSMenuArrow)
automatically update.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@36474 72102866-910b-0410-8b05-ffd578937521
the previous change. If the URL doesn't load then try to load
the image in the NSURL as a "named" image in resources so that
the developer of the app has a way to provide this image.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35316 72102866-910b-0410-8b05-ffd578937521
Some XIB files have image representations encoded
via NSURL. When this happens it causes the XIB not to be loaded at
all since the image rep fails to load and causes the xib loading
process to fail.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@35310 72102866-910b-0410-8b05-ffd578937521
have to small images to be split up into 9 tiles.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34688 72102866-910b-0410-8b05-ffd578937521
RELEASE.
Patch by Philippe Roussel <p.o.roussel@free.fr>.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34492 72102866-910b-0410-8b05-ffd578937521
* Source/NSImage.m: Correct _clearFileTypeCaches notification
method to take a NSNotification* parameter.
* Soure/NSImage.m (themeDidActivate:): Move to a class method,
and move the GSThemeDidActivateNotification subscription
to +[NSImage initialize]. Now the +_themeDidActivate: updates
all images by looking at all the values in nameDict. This should
function exactly the same as before, but seems to be quite a bit
faster due to fewer notifications being sent (?)
* Source/NSImage.m (+imageNamed:): Remove redundant fetch from
nameDict pointed out by Fred
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34482 72102866-910b-0410-8b05-ffd578937521
move to private category. Also remove use of lock as it is
unnecessary
* Source/NSImage.m: (-themeDidActivate:): Extract method
_resetAndUseFromFile:. Don't reset _size if
flags.sizeWasExplicitlySet was true.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34481 72102866-910b-0410-8b05-ffd578937521
on theme activation/deactivation.
* Source/NSImage.m (+imageNamed:): Factor out code for finding
the path for a name to a separate method, +pathForImageNamed.
The code is unchanged otherwise, except for fixing the retrieval
of images from the theme bundle, which was broken.
* Source/NSImage.m (-setName:): Remove code for creating theme
proxy. Subscribe/unscribe to theme change notification when
the receiver is added/removed from the name dictionary.
* Source/NSImage.m (-themeDidActivate:): Method called in
response to a GSThemeDidActivateNotification on images with
a name set. It does a path lookup in the same way that
+imageNamed: would, and checks if the path has changed due
to the theme change. If it has, all reps are discarded and
the image at the new path is loaded. This avoids the need for
the theme proxy objects.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34474 72102866-910b-0410-8b05-ffd578937521
change for the case where there are no representations for the
image.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34168 72102866-910b-0410-8b05-ffd578937521
all other matching criteria fail, use the first image instead
of the last (arbitrary, but seems to match cocoa.)
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34166 72102866-910b-0410-8b05-ffd578937521
as it is currently broken on the cairo backend.
* Source/NSApplication.m (-setApplicationIconImage:): Don't
use call -setScalesWhenResized:, because if it worked as it is
supposed to, it would scale all icon reps down to 48x48,
making large icon sizes useless.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34164 72102866-910b-0410-8b05-ffd578937521
representation into the new cache. Use NSRectFillUsingOperation
instead of PScompositerect.
* Source/NSImage.m (-drawRepresentation:inRect:): Use DPS
operations instead of PS operations.
Should fix bug #34470
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33948 72102866-910b-0410-8b05-ffd578937521
locking focus on an image with no representations.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33827 72102866-910b-0410-8b05-ffd578937521
size (0, 0)
* Source/NSCachedImageRep.m: Throw an exception if you attempt to create a cached
image rep with a size of (0, 0).
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33819 72102866-910b-0410-8b05-ffd578937521
because we now cache the entire representation and not the rep scaled
to the image's size.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33770 72102866-910b-0410-8b05-ffd578937521
on backends supporting GSdraw: (cairo). This means we don't have to
create a window for every call to draw an image, and gives me a 5-10x
speedup for image drawing.
* Source/NSCachedImageRep.m: Implement private method
-nativeDrawInRect:.. which is called by NSImageRep's
-drawInRect:fromRect:..., and efficiently draw the cached rep
using GSdraw:. Also make some changes so cached image reps can have a
DPI != 72.
* Headers/AppKit/NSCachedImageRep.h: New private init method that lets
you specify diferent pixel size and point size.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33765 72102866-910b-0410-8b05-ffd578937521
-drawInRect:fromRect:operation:fraction:respectFlipped:hints: method
* Source/NSImage.m:
* Source/NSImageRep.m: Refactor drawing code from NSImage to NSImageRep.
This should cause no functionlity change, but it lets NSImageRep
subclasses implement more efficient versions of -drawInRect:fromRect:...
that don't involve the (expensive) drawing of the image in a temporary
offscreen window and then drawing from there on to the destination surface.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33764 72102866-910b-0410-8b05-ffd578937521
rep has a size of zero, or is a vector rep. Prevent division by 0.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33742 72102866-910b-0410-8b05-ffd578937521
* Source/NSCustomImageRep.m:
- Don't retain the delegate (matching OS X)
- Remove unnecessary flip checks from -drawAtPoint: and -drawInRect:
to match the code in NSImageRep
- Fix a mistake when setting the ctm scale factor
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33741 72102866-910b-0410-8b05-ffd578937521
demonstrated in GSTest:
- drawing an image in a flipped view with -drawInRect:... wasn't
working, and
- drawing a vector rep in a dest rect larger than the point
size of the rep was resulting in blurry output.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@33570 72102866-910b-0410-8b05-ffd578937521