Re: Getting immutable UIImage data pointer without copy?

2017-11-15 Thread Bill Dudney
> On Nov 14, 2017, at 8:37 PM, Rick Mann wrote: > >> I’m not super into graphics, but my gut feeling is that, if you care about >> optimization details like whether pixmaps are being copied, you should >> really be using a lower-level graphics API than UIImage, which is

Re: [ANN] Nursery Framework 1.0.1 (build with Xcode 9) released

2017-10-25 Thread Bill Dudney
Takata, Thanks for making something. Good luck with your treatment, and welcome back to the land of development! TTFN, -bd > On Oct 25, 2017, at 7:29 AM, Akifumi Takata wrote: > > Dear Alex Zavatone, > > I prefer to be called as Takata. > > I create the repository on

Re: exporting image files to disk using CGImageDestination

2014-02-24 Thread Bill Dudney
On Feb 24, 2014, at 9:48 AM, Kevin Meaney k...@yvs.eu.com wrote: On 24 Feb 2014, at 17:21, Mike Abdullah mabdul...@karelia.com wrote: On 24 Feb 2014, at 17:00, Kevin Meaney k...@yvs.eu.com wrote: I've written a command line tool that takes an image file (when testing I'm using JPEG files)

Re: Core Graphics optimisation

2012-08-13 Thread Bill Dudney
A much faster and simpler approach to do exactly what you have here is CAShapeLayer. That will draw the path via OpenGL on your behalf without you having to study OpenGL. That said, copying and pasting from stack overflow or cocoa-dev list is never a good solution in the long run. You might

Re: adding space for 'annotations' with a typesetter subclass

2012-06-05 Thread Bill Dudney
:36 AM, Bill Dudney wrote: I'm able to add additional space around a paragraph in my subclass of NSATSTypesetter's implementation of willSetLineFragmentRect:forGlyphRange:usedRect:baselineOffset:. However, I am not getting what I expect as I tweak the parameters to this method. I was hoping

adding space for 'annotations' with a typesetter subclass

2012-06-01 Thread Bill Dudney
Hello, I'm able to add additional space around a paragraph in my subclass of NSATSTypesetter's implementation of willSetLineFragmentRect:forGlyphRange:usedRect:baselineOffset:. However, I am not getting what I expect as I tweak the parameters to this method. I was hoping for some insight on

Re: CoreData: Fetching object with maximum of property

2008-10-07 Thread Bill Dudney
for a property? Frank On Oct 7, 2008, at 1:08 PM, Bill Dudney wrote: Hi Frank, That and a whole lot more; http://developer.apple.com/documentation/Cocoa/Conceptual/Predicates/predicates.html#/ /apple_ref/doc/uid/TP40001798 Good luck! -bd- http://bill.dudney.net/roller/objc On Oct 7, 2008, at 3

Re: How do I get CAScrollLayer to draw its sublayers

2008-09-22 Thread Bill Dudney
Hi Cesar, I had more luck getting rid of the scroll layer and using a 'normal layer'. http://bill.dudney.net/roller/objc/entry/catiledlayer_example Has a full example of doing the tiled layer stuff with a PDF. My book has an example on doing the tiled layer stuff with tiled jpg files;

Re: How to pause and resume an animation that uses a transform (CATransform3DMakeScale)?

2008-08-21 Thread Bill Dudney
Hi John, Try the layer's presentationLayer property. The presentationLayer is the thing that is actually moving around and you should be able to get 'current' values from it (give or take a bit). HTH, -bd- http://bill.dudney.net/roller/objc http://www.pragprog.com/titles/bdcora On Aug

Re: CATiledLayer documentation

2008-08-18 Thread Bill Dudney
Hi, I have an example on my blog of using the CATiledLayer with a big pdf file and the CA book (I am the author) has an example of using image tiles. http://www.pragprog.com/titles/bdcora http://bill.dudney.net/roller/objc Good luck, -bd- On Aug 18, 2008, at 10:37 AM, Houdah - ML Pierre

Re: CATiledLayer documentation

2008-08-18 Thread Bill Dudney
image source containing tiles. I wanted to access the web site of your book. I was hoping for an eBook to purchase. The server however hasn't been responding all day. Best, Pierre Bernard Houdah Software s.à r.l. On 18 Aug 2008, at 19:16, Bill Dudney wrote: Hi, I have an example on my

Re: Animating a view along a path

2008-08-15 Thread Bill Dudney
Hi Chilton, There are a couple of examples of doing just that in the CA book (disclaimer: I'm the author) showing how to animate views with keyframe animations. http://www.pragprog.com/titles/bdcora The basic idea is to set the path for the keyframe animation and then put that animation

Re: Servicing Core Animations?

2008-07-14 Thread Bill Dudney
Hi Chilton, The animator does not commit its transaction until back in the event loop so you won't see any animation until you return to the main event loop. You can of course override this but in the example below you are doing the animation yourself so there is no reason for CA. i.e.

Re: More CALayer Questions

2008-07-07 Thread Bill Dudney
Hi Gordon, 'the upcomming book on animation'? If by that you mean the Core Animation book from Pragmatic Programmers you can get the PDF now from http://www.pragprog.com/titles/bdcora and then the paper when it ships. You get a really good discount on it if you buy both. Not sure where

Re: OpenStreetMap GPS/Map Viewer

2008-07-01 Thread Bill Dudney
Hi Joeles, The tiled layer does much of the work for you in terms of scrolling and scaling. I have an example on my blog; http://bill.dudney.net/roller/objc/entry/catiledlayer_example that does something like what you want (I expect based on the description). Good luck! -bd-

Re: Core animation

2008-06-30 Thread Bill Dudney
Text is tricky because of the anti-aliasing issues. Broaden your search though there are tons of examples on how to fade a layer in and out of a scene (apple's samples, my blog, others as well). Basically though - parent view needs to be layer backed (via setWantsLayer:YES) - create a layer

Re: Core Data, SQL stores, and predicate restrictions

2008-05-16 Thread Bill Dudney
HI Sean, One example would be if you have a method that calculates a value. That value would not be in the DB so the compiled predicate (if it would even compile) would not work because there is not column corresponding to your calc'd value. I think this is worth filing a bug against the

Re: Resizing NSView with CABasicAnimation

2008-04-15 Thread Bill Dudney
Hi Michael, Are you layer backed or layer hosting (i.e. did you se the layer explicitly?) If you are layer hosting then add he explicit animation to the view instead of the layer (when layer backing you should not manipulate the layer directly). If you are doing layer hosting then try

Re: Core Animation layer-backed NSViews and mouse handling

2008-04-09 Thread Bill Dudney
Hi Matt, I hope what Scott said made sense (and what I said in the book, thanks BTW to Mike for the plug). If you have a layer backed view (i.e. you only call myButton.wantsLayer = YES) then you should not ever touch the layer, only use the methods that are exposed through the view and

Re: CATextLayer metrics

2008-02-28 Thread Bill Dudney
Hi Karl, Have you tried the preferredFrameSize method? I have had success in doing simple text sizing with this method ( by simple i mean that i've done labels and such). It won't tell you the # of lines but it will give you a frame size. HTH, -bd- http://bill.dudney.net/roller/objc On

Re: Animated button

2008-02-26 Thread Bill Dudney
Hi Micha, I'd suggest core animation as the easiest route but i'm sort of partial. HTH, -bd- http://bill.dudney.net/roller/objc On Feb 26, 2008, at 8:37 AM, Micha Fuhrmann wrote: Hi everyone, what is the simplest way to implement an animated button (the animation should start as it is

Re: Animated button

2008-02-26 Thread Bill Dudney
Hi Micha, I'd suggest core animation as the easiest route but i'm sort of partial. HTH, -bd- http://bill.dudney.net/roller/objc On Feb 26, 2008, at 8:37 AM, Micha Fuhrmann wrote: Hi everyone, what is the simplest way to implement an animated button (the animation should start as it is

Re: Animated button

2008-02-26 Thread Bill Dudney
Hi, Sure... Make 2 layers one is the 'background' the other is the button (think the 'on/off' switch in time machine prefs pane) when the user clicks the button you switch it to the on or off position with buttonLayer.position = oppositePosition (a CGPoint) make sense? If not please feel