Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?
Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?
- Subject: Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?
- From: Alastair Houghton <email@hidden>
- Date: Wed, 1 Oct 2008 11:23:09 +0100
On 1 Oct 2008, at 00:43, Michael Robinson wrote:
On 1/10/2008, at 3:23 AM, Alastair Houghton wrote:
If you're rendering this in advance using Cocoa, why not use the -
appendBezierPathWithArcFromPoint:toPoint:radius: method on
NSBezierPath to construct a rounded path?
The code that outputs the divs is:
int i;
NSMutableString *cornerElements = [NSMutableString new];
for(i = cornerSize; i > 0; i--){
[cornerElements appendString:[NSString stringWithFormat:@"<div
style=\"font-size:0em;margin-left:%ipx;margin-right:%ipx;height:
1px;overflow:hidden;background-color:%@;\"> </div>",[self
getCornerStripWidth:i:[borderDDTL selectedTag]:sizeTL:cornerSize],
[self getCornerStripWidth:i:[borderDDTR
selectedTag]:sizeTR:cornerSize],[self hexColor:[portalBGColour
color]]]];
}
Ah, OK, I see what you're doing. I had assumed that you were doing
the corners as bitmaps, but you're using the div method instead. The
alternative would be to actually render the corners into a bitmap
using Cocoa, then output (for instance) a div with its background set
to the corner image.
Kind regards,
Alastair.
--
http://alastairs-place.net
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden