Re: NSBezierPath on iOS?

2017-05-22 Thread Steve Mills
On May 22, 2017, at 06:23:32, Dave wrote: > > I changed it to use UIBezierPath but now I get errors on the 3 + methods it > uses - fillRect, setDefaultLineWidth and strokeRect. It would really help if we knew what the errors were. > myPath = [UIBezierPath bezierPathWithRect:myRect]; >

Re: NSBezierPath on iOS?

2017-05-22 Thread Dave
;> All the Best >>> Dave >>> >>>> On 22 May 2017, at 12:09, Dave wrote: >>>> >>>> Hi, >>>> >>>> I’m converting a Class from Mac to iOS and I’ve got errors on the >>>> following code: >>>> >

Re: NSBezierPath on iOS?

2017-05-22 Thread Dave
gt; >>> On 22 May 2017, at 12:09, Dave wrote: >>> >>> Hi, >>> >>> I’m converting a Class from Mac to iOS and I’ve got errors on the following >>> code: >>> >>> if (self.pDrawPaneFlag == YES) &

Re: NSBezierPath on iOS?

2017-05-22 Thread dangerwillrobinsondanger
inding hard to remember the differences. > > All the Best > Dave > >> On 22 May 2017, at 12:09, Dave wrote: >> >> Hi, >> >> I’m converting a Class from Mac to iOS and I’ve got errors on the following >> code: >> >> if (self.pDrawPa

Re: NSBezierPath on iOS?

2017-05-22 Thread Dave
Class from Mac to iOS and I’ve got errors on the following > code: > > if (self.pDrawPaneFlag == YES) > { > [self.pPaneColor set]; > [NSBezierPath fillRect:myRect]; > } > > if (self.pDrawFrameFlag == YES) > { >

NSBezierPath on iOS?

2017-05-22 Thread Dave
Hi, I’m converting a Class from Mac to iOS and I’ve got errors on the following code: if (self.pDrawPaneFlag == YES) { [self.pPaneColor set]; [NSBezierPath fillRect:myRect]; } if (self.pDrawFrameFlag == YES) { [self.pFrameColor set

Re: NSBezierPath + thin lines + antialias = :(

2015-02-10 Thread Clark S. Cox III
> On Feb 10, 2015, at 15:34, Clark S. Cox III wrote: > >> >> On Feb 10, 2015, at 12:20, Quincey Morris >> wrote: >> >> On Feb 10, 2015, at 11:23 , Jerry Krinock wrote: >>> >>> I’ve always wondered why, when you’re dragging a window around a non-Retina >>> screen, the anti-aliasing doesn’t

Re: NSBezierPath + thin lines + antialias = :(

2015-02-10 Thread Clark S. Cox III
> On Feb 10, 2015, at 12:20, Quincey Morris > wrote: > > On Feb 10, 2015, at 11:23 , Jerry Krinock wrote: >> >> I’ve always wondered why, when you’re dragging a window around a non-Retina >> screen, the anti-aliasing doesn’t show a “comb filter” kind of effect, with >> different lines getti

Re: NSBezierPath + thin lines + antialias = :(

2015-02-10 Thread Quincey Morris
On Feb 10, 2015, at 11:23 , Jerry Krinock wrote: > > I’ve always wondered why, when you’re dragging a window around a non-Retina > screen, the anti-aliasing doesn’t show a “comb filter” kind of effect, with > different lines getting fuzzy and sharp as they are dragged on and off their > pixels

Re: NSBezierPath + thin lines + antialias = :(

2015-02-10 Thread Jerry Krinock
> On 2015 Feb 10, at 05:36, Charles Jenkins wrote: > > This may explain why my purchase of a program that outputs code for vector > images resulted in disappointment. Counterintuitive at first, but, yes :)) I’ve always wondered why, when you’re dragging a window around a non-Retina screen, t

Re: NSBezierPath + thin lines + antialias = :(

2015-02-10 Thread Charles Jenkins
This may explain why my purchase of a program that outputs code for vector images resulted in disappointment. I don't have a retina display, so I bought a program to make graphics code that would look good at any size/resolution in my Mac app, even for displays I have no experience with. What I

Re: NSBezierPath + thin lines + antialias = :(

2015-02-09 Thread Jerry Krinock
> On 2015 Feb 09, at 13:28, Uli Kusterer wrote: > > The image didn’t make it to the list, Oh, well. I recall being able to send pictures in the past, as long as the message size was < 25K. Maybe this is a new feature :( > Here’s an article (with pictures!) about this issue I wrote ages ago:

Re: NSBezierPath + thin lines + antialias = :(

2015-02-09 Thread Graham Cox
> On 10 Feb 2015, at 9:16 am, Quincey Morris > wrote: > > FWIW (and while we wait for Jerry to tell us what was in the missing screen > shot), I’ve abandoned the “offset it by 0.5 points” approach, in the last > year or two. I don’t necessarily have an unarguable justification, but my > reas

Re: NSBezierPath + thin lines + antialias = :(

2015-02-09 Thread Quincey Morris
FWIW (and while we wait for Jerry to tell us what was in the missing screen shot), I’ve abandoned the “offset it by 0.5 points” approach, in the last year or two. I don’t necessarily have an unarguable justification, but my reasoning runs along these lines: 1. For general drawing, when the thin

Re: NSBezierPath + thin lines + antialias = :(

2015-02-09 Thread Jens Alfke
> On Feb 9, 2015, at 1:18 PM, Jerry Krinock wrote: > > Is there a way to draw thin lines in code, and get good results on non-Retina > displays? What should I read to learn how? (The listserv strips image attachments, so we can’t see the pictures.) The typical problem drawing thin horizontal

Re: NSBezierPath + thin lines + antialias = :(

2015-02-09 Thread Uli Kusterer
On 09 Feb 2015, at 22:18, Jerry Krinock wrote: > I may need to break down and learn something about graphics and drawing. > > I use NSBezierPath in a -[NSView drawRect:] to do an engineering-style > drawing. Here is a tiny arrowhead pointing to a vertical “dimension line”: >

NSBezierPath + thin lines + antialias = :(

2015-02-09 Thread Jerry Krinock
I may need to break down and learn something about graphics and drawing. I use NSBezierPath in a -[NSView drawRect:] to do an engineering-style drawing. Here is a tiny arrowhead pointing to a vertical “dimension line”: Not very nice. If instead I draw this in a graphics program, with

Re: [CALayer cornerRadius] vs. [NSBezierPath bezierPathWithRoundedRect:xRadius:yRadius]

2014-12-02 Thread Bill Cheeseman
> On Dec 1, 2014, at 5:50 PM, Graham Cox wrote: > >> On 2 Dec 2014, at 6:19 am, Bill Cheeseman > > wrote: >> >> Can anyone suggest another approach? > > Not another approach, but a possible alternative explanation. Antialiasing. > Those curved corners will cause

Re: [CALayer cornerRadius] vs. [NSBezierPath bezierPathWithRoundedRect:xRadius:yRadius]

2014-12-01 Thread Graham Cox
> On 2 Dec 2014, at 6:19 am, Bill Cheeseman wrote: > > Can anyone suggest another approach? Not another approach, but a possible alternative explanation. Antialiasing. Those curved corners will cause various nearby pixels to be rendered for antialiasing, and these may differ very slightly de

[CALayer cornerRadius] vs. [NSBezierPath bezierPathWithRoundedRect:xRadius:yRadius]

2014-12-01 Thread Bill Cheeseman
I am looking for a way to work around the conflict between -[CALayer cornerRadius] and +[NSBezierPath bezierPathWithRoundedRect:xRadius:yRadius]. These days, NSBezierPath apparently uses a new algorithm to draw rounded corners on a rectangle, resulting in a smoother-appearing curve. However

Re: NSBezierPath with Transparent color stroke

2014-10-20 Thread Gordon Apple
Reminds me when I racked my brain trying to figure out how OmniGraffle drew parallel border lines on Beziers. I tried inset/outset, etc, then slapped my forehead when I realized that they just stroked it with a wide line, then again with a narrow line using the background color. Duh! On 10/20/14

Re: NSBezierPath with Transparent color stroke

2014-10-20 Thread Quincey Morris
On Oct 20, 2014, at 06:50 , Leonardo wrote: > > I really need to fill the rect with flat red and stroke it with a 10 > points-width 50% transparent gray border. What does that mean? Are you trying to fill the entire rect with red, and wrap a 10-point stroke around it (i.e. completely outside t

Re: NSBezierPath with Transparent color stroke

2014-10-20 Thread Ken Thomases
On Oct 20, 2014, at 8:50 AM, Leonardo wrote: > I fill my bezierPath (a simple rect) with a red color. > Then I stroke it with a 10 point border with a 50% transparent gray color. > Since the border of the path gets drawn 50% inside the path and 50% outside > the path, I end up with an external 5

NSBezierPath with Transparent color stroke

2014-10-20 Thread Leonardo
I fill my bezierPath (a simple rect) with a red color. Then I stroke it with a 10 point border with a 50% transparent gray color. Since the border of the path gets drawn 50% inside the path and 50% outside the path, I end up with an external 5 points 50% gray border and an internal 5 points red-gra

Re: Draw image within a NSBezierPath with no border

2014-03-11 Thread Leonardo
apple.com" > > Oggetto: Re: Draw image within a NSBezierPath with no border > > >> On Mar 6, 2014, at 9:25 AM, Leonardo wrote: >> >> That's make sense. Do you know any workaround? >> I have to draw the background color because: >>1) th

Re: Draw image within a NSBezierPath with no border

2014-03-06 Thread Kyle Sluder
ue, you should be able to create the shadow and then draw the layer on top of it: - drawRect: { // Draw the shadow CGContextSaveGState(); NSBezierPath *oval = …; [[NSColor clearColor] setFill]; CGContextSetShadowWithColor(…); [oval fill]; CGContextRestoreGState(); // Draw the clipped

Re: Draw image within a NSBezierPath with no border

2014-03-06 Thread Leonardo
Data: Thu, 6 Mar 2014 09:02:00 -0800 > A: Leonardo > Cc: "cocoa-dev@lists.apple.com" > Oggetto: Re: Draw image within a NSBezierPath with no border > > On Mar 6, 2014, at 8:34 AM, Leonardo wrote: >> >> Hi, I have an oval NSBezierPath path. I fill it with a

Re: Draw image within a NSBezierPath with no border

2014-03-06 Thread Kyle Sluder
On Mar 6, 2014, at 8:34 AM, Leonardo wrote: > > Hi, I have an oval NSBezierPath path. I fill it with a blue color, > then I draw an image within the same path. And I can still see a blue tiny > border around the image. I would expect the color be never visible since the > image c

Re: Draw image within a NSBezierPath with no border

2014-03-06 Thread Kevin Meaney
I'd try clipping before drawing the fill, rather than after. Kevin On 6 Mar 2014, at 16:34, Leonardo wrote: > Hi, I have an oval NSBezierPath path. I fill it with a blue color, > then I draw an image within the same path. And I can still see a blue tiny > border around the

Draw image within a NSBezierPath with no border

2014-03-06 Thread Leonardo
Hi, I have an oval NSBezierPath path. I fill it with a blue color, then I draw an image within the same path. And I can still see a blue tiny border around the image. I would expect the color be never visible since the image covers the whole area. That's my code: fillPath = [NSBezie

Re: NSBezierPath stroke width on retina/nonretina

2013-04-26 Thread Tamas Nagy
Thanks for the tip! I was using integral coordinates without fractions, adding _newframe = NSInsetRect(_newframe, 0.5f, 0.5f); fixed the issue! Thanks! Tamas On Apr 26, 2013, at 5:28 PM, Fritz Anderson wrote: > On 26 Apr 2013, at 9:51 AM, Tamas Nagy wrote: > >> Hi, >> >> found a really we

Re: NSBezierPath stroke width on retina/nonretina

2013-04-26 Thread Fritz Anderson
On 26 Apr 2013, at 9:51 AM, Tamas Nagy wrote: > Hi, > > found a really weird issue with some very basic drawing, and have no idea > whats going wrong (or what I missed:)). Basically I've a subclass of NSButton > and NSButtonCell with some basic custom drawing. I do a 1px width stroke > after

NSBezierPath stroke width on retina/nonretina

2013-04-26 Thread Tamas Nagy
Hi, found a really weird issue with some very basic drawing, and have no idea whats going wrong (or what I missed:)). Basically I've a subclass of NSButton and NSButtonCell with some basic custom drawing. I do a 1px width stroke after all around the button, which is looks cool on my computer ha

Re: How to add randon transparent dots over CGPath or NSBezierPath

2013-02-12 Thread Seth Willits
On Feb 8, 2013, at 9:25 AM, Omkar Ramtekkar wrote: > Wanted to know how can I add transparent dots or lines in CGPath or > NSBezierPath. Here are more details about the problem. I've a solid line say > width = 30(drawn using NSBezierPath or CGPath) , now I wanted to draw >

How to add randon transparent dots over CGPath or NSBezierPath

2013-02-12 Thread Omkar Ramtekkar
Hello, Wanted to know how can I add transparent dots or lines in CGPath or NSBezierPath. Here are more details about the problem. I've a solid line say width = 30(drawn using NSBezierPath or CGPath) , now I wanted to draw transparent dots over it or transparent lines(thickness=2 or some

Re: rotating NSBezierPath objects

2012-07-06 Thread Roland King
On 7 Jul, 2012, at 8:10 AM, William Squires wrote: > Okay, I see in the doc set that you can perform an NSAffineTransform on an > NSBezierPath, but how do I perform a rotation of the NSBezierPath about an > arbitrary CGPoint and with a specified angle in radians? Is this somethin

Re: rotating NSBezierPath objects

2012-07-06 Thread Graham Cox
On 07/07/2012, at 10:10 AM, William Squires wrote: > Okay, I see in the doc set that you can perform an NSAffineTransform on an > NSBezierPath, but how do I perform a rotation of the NSBezierPath about an > arbitrary CGPoint and with a specified angle in radians? Exactly t

rotating NSBezierPath objects

2012-07-06 Thread William Squires
Okay, I see in the doc set that you can perform an NSAffineTransform on an NSBezierPath, but how do I perform a rotation of the NSBezierPath about an arbitrary CGPoint and with a specified angle in radians? Is this something deep in CoreGraphics, or CoreAnimation? If not, I can do the

Re: Converting CGPathAddArcToPoint (or NSBezierPath equivalent) to a fixed number of CGPathAddCurveToPoint calls

2012-05-02 Thread Wim Lewis
On 30 Apr 2012, at 3:26 PM, Gideon King wrote: > Hi, I am using the CAShapeLayer's ability to animate a path, but the start > and end path need to have the same number of segments. > > I have been using CGPathAddArcToPoint to add the curves to my path. That > translates to CGPathAddCurveToPoin

Converting CGPathAddArcToPoint (or NSBezierPath equivalent) to a fixed number of CGPathAddCurveToPoint calls

2012-04-30 Thread Gideon King
Hi, I am using the CAShapeLayer's ability to animate a path, but the start and end path need to have the same number of segments. I have been using CGPathAddArcToPoint to add the curves to my path. That translates to CGPathAddCurveToPoint calls behind the scenes, but sometimes it adds one curv

NSBezierPath HiDPI

2011-09-10 Thread Steven Spencer
d ? I have to rerun the code for it to take account of a display resolution change, how do I fix this ? Thanks. Steven Lion, Xcode 4.1, Garbage collection on. -- #import @interface TestView : NSView { NSBezierPath *thePath; } - (NSAffineTran

Re: Decimation - NSBezierPath or something else?

2011-08-09 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/8/11 5:49 PM, Graham Cox wrote: > I can tell you that 25,000 points in a bezier path will make for > slow drawing, though it also depends on your hardware of course. > Lo and behold, when I went from 7500 points (which rendered instantly) to 250

Re: Decimation - NSBezierPath or something else?

2011-08-08 Thread Graham Cox
rom repeated > intensification at one location. Not knowing what that "something" is in > NSBezierPath or the rest of the path to today's flat panel screen seems risky. The thing to understand is that NSBezierPath doesn't know anything about pixels. It's an abstract

Re: Decimation - NSBezierPath or something else?

2011-08-08 Thread N!K
pixel, something has to be done with them. With the old fashioned CRT, the points would bloom from repeated intensification at one location. Not knowing what that "something" is in NSBezierPath or the rest of the path to today's flat panel screen seems risky. I'll do the decimati

Re: Decimation - NSBezierPath or something else?

2011-08-08 Thread Graham Cox
On 09/08/2011, at 10:32 AM, Conrad Shultz wrote: >> Throwing 25,000 points at NSBezierPath might swamp >> it, or at least run very slowly. > > The obligatory question: is this conjecture or have you found this to be > the case? > > I have some code that plots abou

Re: Decimation - NSBezierPath or something else?

2011-08-08 Thread wadeslists
> Does NSBezierPath do decimation as well as interpolation? I didn't find it in > the Class Reference. It does whatever it needs to do in order to achieve "great" results, where "great" is in practical terms something like "an order of magnitude finer than

Re: Decimation - NSBezierPath or something else?

2011-08-08 Thread Wim Lewis
On 8 Aug 2011, at 5:16 PM, N!K wrote: > Does NSBezierPath do decimation as well as interpolation? I didn't find it in > the Class Reference. > Or is there another class that does it? > Or must I do the decimation before plotting the data with NSBezierPath? No, NSBezierPath do

Re: Decimation - NSBezierPath or something else?

2011-08-08 Thread Conrad Shultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/8/11 5:16 PM, N!K wrote: > Does NSBezierPath do decimation as well as interpolation? I didn't > find it in the Class Reference. Or is there another class that does > it? Or must I do the decimation before plotting the data with

Decimation - NSBezierPath or something else?

2011-08-08 Thread N!K
Does NSBezierPath do decimation as well as interpolation? I didn't find it in the Class Reference. Or is there another class that does it? Or must I do the decimation before plotting the data with NSBezierPath? Decimation reduces the original sampling rate for a sequence to a lower rate,

Bug in NSBezierPath?

2011-06-20 Thread Graham Cox
I've found what I think is a bug in NSBezierPath. I'm just wondering if others have found this, if there's a workaround, or whether I've just stuffed up somewhere. Given a path formed from two closed subpaths such as: [first subpath] MoveTo() LineTo() LineTo() ..

setLineWidth: in NSBezierPath no effect in PDF Document?

2011-06-10 Thread Laurent Daudelin
Not sure if I'm missing something but when creating ink PDF annotations in a document, it seems that no matter what I set the line width to with setLineWidth:, the line width of the ink annotation always appears as being 1.0. Anybody knows if specifying a thicker line in an NSBezierPath

Re: dynamically change circle size held in NSBezierPath

2010-07-25 Thread Charlie Dickman
Use the transformUsingAffineTransform: to scale your path. On Jul 25, 2010, at 4:53 PM, Shane wrote: > When a user decides to display a scatter plot, I iterate through all > my points and add the x,y points to an NSBezierPath as such with a > fixed width and height. > > -

dynamically change circle size held in NSBezierPath

2010-07-25 Thread Shane
When a user decides to display a scatter plot, I iterate through all my points and add the x,y points to an NSBezierPath as such with a fixed width and height. - (void) addCoord:(double) xval yCoord:(double) yval { NSRect rect = NSMakeRect(xval, yval, 1, 1

Re: NSBezierPath EXC_BAD_ACCESS issues.

2010-03-03 Thread Graham Cox
On 04/03/2010, at 12:14 AM, Billy Flatman wrote: > I'm new to Objective-C as you've probably gathered and am not 100% about how > the memory management works. Will I be causing a memory leek with the line: > path = [[NSBezierPath alloc] bezierPath]; > within my initi

Re: NSBezierPath EXC_BAD_ACCESS issues.

2010-03-03 Thread Billy Flatman
memory leek with the line: path = [[NSBezierPath alloc] bezierPath]; within my initialiseBezierPath method? Thanks for your help, Billy. On 3 Mar 2010, at 12:48, Graham Cox wrote: > Your setBezierPath method is making a new, autoreleased path, it isn't using > the one you cre

Re: NSBezierPath EXC_BAD_ACCESS issues.

2010-03-03 Thread Graham Cox
shouldn't make another path, you already made it, but also it shouldn't be named set... as it's not setting anything. Call it initialiseBezierPath for example. --Graham On 03/03/2010, at 11:34 PM, Billy Flatman wrote: > Hi all, > > I have a shape class containing

NSBezierPath EXC_BAD_ACCESS issues.

2010-03-03 Thread Billy Flatman
Hi all, I have a shape class containing an attribute: NSBezierPath *path; initialisation: path = [[NSBezierPath alloc] init]; [self setBezierPath]; setBezierPath: path = [NSBezierPath bezierPath]; then add the paths and close path. paint: [path setLineWidth: 1]; [path fill]; It all worked

Re: NSBezierPath linewidth not correct

2010-01-04 Thread Alastair Houghton
sharp blue rectangle (by default), even though [[NSColor redColor] set]; [NSBezierPath strokeRect:myRect]; will (on current displays) add a fuzzy outline. Also, even if you adjust for the 0.5 pixel offset, you don't necessarily want to do so in both axes (depends what you're doing)

Re: NSBezierPath linewidth not correct

2010-01-03 Thread Gustavo Pizano
wrote: > >> >> It will probably be easier to create an NSAffineTransform and translate the >> whole context by 0.5px, so all drawing is offset without you needing to >> fiddle with individual values. > > Just a hint: > NSBezierPath has a method which all

Re: NSBezierPath linewidth not correct

2010-01-03 Thread Heinrich Giesen
On 03.01.2010, at 00:45, Rob Keniger wrote: It will probably be easier to create an NSAffineTransform and translate the whole context by 0.5px, so all drawing is offset without you needing to fiddle with individual values. Just a hint: NSBezierPath has a method which allows to use

Re: NSBezierPath linewidth not correct

2010-01-02 Thread Rob Keniger
On 02/01/2010, at 8:58 PM, Gustavo Pizano wrote: > No worries, I modify it and in fact it does work, but the background images > will display a .5 gap between along the horizon between the images that > conform the background, so I will put just a .5 to everywhere I need > instead... It wil

Re: NSBezierPath linewidth not correct

2010-01-02 Thread Gustavo Pizano
No worries, I modify it and in fact it does work, but the background images will display a .5 gap between along the horizon between the images that conform the background, so I will put just a .5 to everywhere I need instead... Gustavo On Jan 2, 2010, at 11:43 AM, Gustavo Pizano wrote: > Fo

Re: NSBezierPath linewidth not correct

2010-01-02 Thread Gustavo Pizano
Forgot to mention... or ask. I guess this come from where the view its positioned.. so If I want to draw anything I will have to do it at .5 on each point, shall I change instead the y origin to a .5 coordinate so I will don't don't put .5 on each drawing I make in the view? or the mistake com

Re: NSBezierPath linewidth not correct

2010-01-02 Thread Gustavo Pizano
:S:S:S:S I didn't realize it... I was suspecting such a thing... adding a .5 to the Y values of the path fix the whole thing.. thx a lot!!! :D Gustavo On Jan 2, 2010, at 11:37 AM, Graham Cox wrote: > > On 02/01/2010, at 9:29 PM, Gustavo Pizano wrote: > >> but nothing seems to work... w

Re: NSBezierPath linewidth not correct

2010-01-02 Thread Graham Cox
On 02/01/2010, at 9:29 PM, Gustavo Pizano wrote: > but nothing seems to work... what am I missing here? You're drawing the line at an integer coordinate. That places it exactly between the pixels on the screen, so to anti-alias the line, it gets drawn on both sides at half brightness. Adding

NSBezierPath linewidth not correct

2010-01-02 Thread Gustavo Pizano
, _bottomLeft, _bottom, _bottomRight, NSCompositeSourceOver, 1.0f, NO); NSBezierPath * path = [[NSBezierPath alloc] init]; [path moveToPoint:NSMakePoint(frame.origin.x + 40.0f, frame.origin.y + 66.0f)]; [path setLineWidth:0.0f]; [path lineToPoint:NSMakePoint(frame.size.width - 40.0f, frame.origin.y

Re: NSBezierPath vs. NSImage

2009-12-11 Thread Rob Keniger
On 11/12/2009, at 8:59 PM, Alastair Houghton wrote: > Anyway, the thing to do is to draw what you want, and then *if* it's going > too slowly there are various things you can do to speed it up (like caching > any expensive rendering in an NSImage, doing reduced or simplified rendering > during

Re: NSBezierPath vs. NSImage

2009-12-11 Thread Alastair Houghton
pie chart in iPartition (excuse the blatant plug, but it's kind of pretty and a fairly complex piece of drawing): <http://www.coriolis-systems.com/iPartition.php> It's rendered using NSBezierPath; we use an NSShadow for the shadow behind it, but drawing that is too slow on

Re: NSBezierPath vs. NSImage

2009-12-11 Thread Michael Abendroth
On Fri, Dec 11, 2009 at 11:14 AM, Alastair Houghton wrote: > On 11 Dec 2009, at 09:10, Michael Abendroth wrote: > >> when drawing custom buttons, should you use NSBezierPath or NSImage >> instances? > > Yes. > >> Which is more efficient, performance-wise / memory-

Re: NSBezierPath vs. NSImage

2009-12-11 Thread Alastair Houghton
On 11 Dec 2009, at 09:10, Michael Abendroth wrote: > when drawing custom buttons, should you use NSBezierPath or NSImage instances? Yes. > Which is more efficient, performance-wise / memory-wise? You probably don't need to worry too much about this on modern systems. In fact, I&#x

NSBezierPath vs. NSImage

2009-12-11 Thread Michael Abendroth
Hi, when drawing custom buttons, should you use NSBezierPath or NSImage instances? Which is more efficient, performance-wise / memory-wise? Thanks for any tips, - Mike ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin

Re: Multithreading NSBezierPath creation and stroking. Measuring performance

2009-10-28 Thread Sean McBride
On 10/27/09 2:05 AM, Karolis Ramanauskas said: >At this point I started optimizing drawing, so I implemented some cacheing, >etc. and I see significant performance gains. Now my attention is on drawing >multiple series as can be seen in the picture above. I decided that this is >a great place to i

Re: Multithreading NSBezierPath creation and stroking. Measuring performance

2009-10-27 Thread Karolis Ramanauskas
Just noticed I forgot to lock: [plotBitmaps addObject:bitmap]; ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com He

Re: Multithreading NSBezierPath creation and stroking. Measuring performance

2009-10-27 Thread Karolis Ramanauskas
attached is the .m file with relevant code... KR2DScatterPlotViewPlot.m Description: Binary data ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at coco

Multithreading NSBezierPath creation and stroking. Measuring performance

2009-10-27 Thread Karolis Ramanauskas
entation and this is what I came up with: 1. For each series create an operation using NSInvocationOperation 2. The operation consists of: - looping through the points in the series and creating an NSBezierPath - creating NSBitmapImageRep - creating NSGraph

Re: Removing or ignoring "lineWidth" property of an NSBezierPath instance

2009-04-27 Thread Graham Cox
While by default without scaling, on screen there is a 1:1 correspondence between them they are completely independent. The only exception to this is when you specify a line width of 0 with NSBezierPath - that will be resolution dependent but it's a special case, and doesn't apply

Re: Removing or ignoring "lineWidth" property of an NSBezierPath instance

2009-04-27 Thread Tobias Zimmerman
e same width in a separate view that has a different dot-pitch, pixel ratio, etc. > From: Graham Cox > Date: Thu, 23 Apr 2009 10:27:25 +1000 > To: Tobias Zimmerman > Cc: "cocoa-dev@lists.apple.com" > Subject: Re: Removing or ignoring "lineWidth" property of

Re: Removing or ignoring "lineWidth" property of an NSBezierPath instance

2009-04-22 Thread Graham Cox
On 23/04/2009, at 7:19 AM, Tobias Zimmerman wrote: (By way of further explanation, the project this arises in involves a set of bezier paths that are generated in one program and archived for use in a separate program. I would like the lineWidth and other drawing specifics such as line/fi

Re: Removing or ignoring "lineWidth" property of an NSBezierPath instance

2009-04-22 Thread Alastair Houghton
On 22 Apr 2009, at 22:19, Tobias Zimmerman wrote: First, the documentation for NSBezierPath’s -(CGFloat)lineWidth method states that: "If no value was set explicitly for the receiver, this method returns the default line width." This suggests that a newly created NSBezierPath shou

Removing or ignoring "lineWidth" property of an NSBezierPath instance

2009-04-22 Thread Tobias Zimmerman
I am trying to find a way to ensure that a series of NSBezierPaths are drawn using [NSBezierPath defaultLineWidth] value. However, contrary to documentation and expectation, my paths seem to automatically assign themselves the value 1.0 for their own lineWidth property. First, the documentation

Re: Draw NSBezierPath inside a PDFPage

2009-03-07 Thread Antonio Nunes
On 7 Mar 2009, at 22:17, malcom wrote: In fact I need to make a small editor that allow the user to draw and edit NSBezierPath (like in Sketch example) inside a PDFPage and then incorporate them inside the page (in a second moment). My temp solution is to draw an image with the pdf

Re: Draw NSBezierPath inside a PDFPage

2009-03-07 Thread malcom
In fact I need to make a small editor that allow the user to draw and edit NSBezierPath (like in Sketch example) inside a PDFPage and then incorporate them inside the page (in a second moment). My temp solution is to draw an image with the pdf rapresentation and then draw it as background for my

Re: Draw NSBezierPath inside a PDFPage

2009-03-07 Thread Antonio Nunes
On 7 Mar 2009, at 10:51, malcom wrote: is possible to draw NSBezierPath inside a PDFPage? How? Yes it is. How, depends on what you want to do, but you provide no information about that. Is it for onscreen drawing only, or is it to be incorporated into the PDF page saved/printed? Are you

Draw NSBezierPath inside a PDFPage

2009-03-07 Thread malcom
Hello, is possible to draw NSBezierPath inside a PDFPage? How? Thanks ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at

Re: NSBezierPath (Modifying Paths)

2009-02-04 Thread Rob Keniger
On 05/02/2009, at 10:11 AM, Graham Cox wrote: You can download a very bare-bones demo app that also shows how DK implements curve creation/editing among others here:http://apptree.net/code/dk/Binaries/DKMiniDemo_app_1.2.zip ...which, by the way, is one hell of an impressive "bare bones demo

Re: NSBezierPath (Modifying Paths)

2009-02-04 Thread Graham Cox
o modify the points? Essentially all that Cocoa provides is the - elementAtIndex:associatedPoints: method and its inverse. That's about as minimalistic as it gets - all of the other interactive stuff needed you'll have to write. In DrawKit I tackle this in several stages. First, I h

Re: NSBezierPath (Modifying Paths)

2009-02-04 Thread Quincey Morris
NSBezierPath objects. Then, drawing in your user interface would be easy -- just stroke the underlying paths. However, the *usability* isn't great, and would likely get worse as you added more functionality. (For example, by following this approach, you already lost the ability to draw new stu

Re: NSBezierPath (Modifying Paths)

2009-02-04 Thread Joseph Crawford
at are fully created. That is, in mouseUp but not before, add the current path to the path array. -- Don't bother trying to *change* the NSBezierPath object that's in the process of being created, just create a brand new one each time you go through mouseDragged. Performance w

Re: NSBezierPath (Modifying Paths)

2009-02-04 Thread Quincey Morris
eUp but not before, add the current path to the path array. -- Don't bother trying to *change* the NSBezierPath object that's in the process of being created, just create a brand new one each time you go through mouseDragged. Performance would be the only reason not to do thi

NSBezierPath (Modifying Paths)

2009-02-04 Thread Joseph Crawford
Hello Everyone, I am working on something small just to learn with and I have been trying to figure this out for a while. The end result that I am looking for is this Draw A straight line click the line and drag to make that line curve Now I have been able to get all of this to work aside

RE: Stroking "on the inside" with NSBezierPath

2009-01-30 Thread Ulai Beekam
The clipping path was indeed what I was looking for to solve this. Thank you sirs! :) >> The default stroke seems to be one that assumes the path you make is >> the center of the stroke. How can I make the stroke be on one of the >> *side* of the path? Depending on how you look at it it could

Re: Stroking "on the inside" with NSBezierPath

2009-01-30 Thread David Duncan
", "outside" or "inside". Any way to modify that? No, Quartz (which is the underlying technology that NSBezierPath uses) does not support stroking on only one side of a path. Depending on exactly what you are doing there are various workarounds for this, but you will

Re: Stroking "on the inside" with NSBezierPath

2009-01-30 Thread glenn andreas
On Jan 30, 2009, at 2:19 PM, Ulai Beekam wrote: The default stroke seems to be one that assumes the path you make is the center of the stroke. How can I make the stroke be on one of the *side* of the path? Depending on how you look at it it could be to the "right", "left", "outside" or "

Re: Stroking "on the inside" with NSBezierPath

2009-01-30 Thread Matthew Johnson
The default stroke seems to be one that assumes the path you make is the center of the stroke. How can I make the stroke be on one of the *side* of the path? Depending on how you look at it it could be to the "right", "left", "outside" or "inside". Any way to modify that? Thanks,U Just

Stroking "on the inside" with NSBezierPath

2009-01-30 Thread Ulai Beekam
The default stroke seems to be one that assumes the path you make is the center of the stroke. How can I make the stroke be on one of the *side* of the path? Depending on how you look at it it could be to the "right", "left", "outside" or "inside". Any way to modify that? Thanks,U __

Re: NSBezierPath

2008-12-20 Thread Michael Ash
On Sat, Dec 20, 2008 at 1:35 PM, Amr Nashaat wrote: > Hi, > > does anyone knows how can I use the NSBezierPath function to create a > circle? Have you considered searching the internet? If I take your question and put it verbatim into Google, the very first hit that comes back has

Re: NSBezierPath

2008-12-20 Thread Randall Meadows
On Dec 20, 2008, at 11:35 AM, Amr Nashaat wrote: does anyone knows how can I use the NSBezierPath function NSBezierPath is not a "function", but anyway... to create a circle? + (NSBezierPath *)bezierPathWithOvalInRect:(NSRect)aRect where aRect describe

NSBezierPath

2008-12-20 Thread Amr Nashaat
Hi, does anyone knows how can I use the NSBezierPath function to create a circle? thanx. ___ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa

Re: NSBezierPath problems, seems to be two bugs [solved]

2008-10-30 Thread Jochen Moeller
: [overlayWindow setHasShadow:YES]; When changed to: [overlayWindow setHasShadow:NO]; the background remains clear as expected. So the "shape" turns out to be the shadow of the first NSBezierPath stroke (Why only the first one in the animation?). Another remaining question is: Why can NSRect

Re: NSBezierPath problems, seems to be two bugs

2008-10-15 Thread Jochen Moeller
eCopy whereas NSBezierPath does not modify the current setting that is accessible via - [NSGraphicsContext compositingOperation]. Aki On 2008/10/15, at 4:56, Jochen Moeller wrote: Hello List, in the sample code Movie_Overlay (here with Xcode 3.1.1) <http://developer.apple.com/samplecode/Movie

  1   2   >