Re: Drawing same text and graphics in different CGContextRef

2023-09-22 Thread David Duncan via Cocoa-dev
> On Sep 22, 2023, at 12:44 PM, JPH wrote: > > Hi David, > > Trying to understand the mechanism you suggest ( I am not familiar with > the concept of context pushing - poping :(I ) > > NSGraphicsContext * newcontext= > [NSGraphicsContex > graphicsContextWithCGContext:theprintContext

Re: Drawing same text and graphics in different CGContextRef

2023-09-22 Thread JPH via Cocoa-dev
Hi David, Trying to understand the mechanism you suggest ( I am not familiar with the concept of context pushing - poping :(I ) NSGraphicsContext * newcontext= [NSGraphicsContex graphicsContextWithCGContext:theprintContext flipped:YES] // theprintContext obtained from PMSessionGetCGGra

Re: Drawing same text and graphics in different CGContextRef

2023-09-22 Thread David Duncan via Cocoa-dev
> On Sep 22, 2023, at 11:12 AM, JPH via Cocoa-dev > wrote: > > 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