• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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:%@;\">&nbsp;</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


  • Follow-Ups:
    • Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?
      • From: Michael Robinson <email@hidden>
  • Next by Date: Remove Duplicates in a NSArray
  • Next by thread: Re: [Math] sin(), cos() not working? What special magic must I use to summon their powers?
  • Index(es):
    • Date
    • Thread