Re: Drawing same text and graphics in different CGContextRef

2023-09-22 Thread JPH via Cocoa-dev
t JP a graphic context created by myself ( hence not the supplied on by the printing framework ) > Le 22 sept. 2023 à 17:59, David Duncan a écrit : > > > >> On Sep 22, 2023, at 11:12 AM, JPH via Cocoa-dev >> wrote: >> >> I am facing the following pr

Drawing same text and graphics in different CGContextRef

2023-09-22 Thread JPH via Cocoa-dev
I am facing the following problems in drawing text and graphics in CGContextRef of an NSview and Printing framework: 1) drawing text using: [finalString drawInRect:textBox withAttributes:attributes]; Works nicely in my sub-classed NSViews in a CGContextRef obtained in the drawRect :

Re: Avoiding leaks with "initWithCGImage"

2023-08-24 Thread JPH via Cocoa-dev
à 07:44, Sandor Szatmari a écrit : You mention ARC… aren’t you not supposed to explicitly release objects under ARC? Am I misunderstanding? Sandor > >> On Aug 23, 2023, at 4:47 PM, JPH via Cocoa-dev >> wrote: >> >> Hello friends, >> >> The enclosed

Avoiding leaks with "initWithCGImage"

2023-08-23 Thread JPH via Cocoa-dev
Hello friends, The enclosed procedure is producing a NSImage from another NSImage, by cropping in a NSRect. The resulting sub-Image feeds an imageView in the APP Interface and the may change frequently, then being hopefully disposed by ARC The last line of the procedure : NSImage *subImage