Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6605177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:15:10+00:00 2026-05-25T19:15:10+00:00

Wouldnt it make much more sense if CGContextRef was an actual object? Now u

  • 0

Wouldnt it make much more sense if CGContextRef was an actual object?
Now u need to give the context with it, everytime u want to add a path.
Wouldnt it be much nicer to say:
[context addPath:myPath];
instead of
CGContextAddPath(context,myPath);

Is it a struct or whats the deal here?
Anyone care to elaborate?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:15:11+00:00Added an answer on May 25, 2026 at 7:15 pm

    It might be easier from a programmer’s point of view, but part of the reason that it is in C is for performance. When doing graphics intensive code, and rendering time matters (which is nearly always), the last thing you want to be doing is allocating lots of temporary objects. It’s a tradeoff – performance for readability/maintainability.

    As Martin Ullrich mentioned, there are some Objective-C wrappers around some of the Core Graphics stuff, but it’s really a lot better to know what going on “under the hood” before using the Objective-C stuff (which will be easier, but slightly slower).

    BTW this slowness I’m talking about is only really an issue when you are doing a lot of drawing, and you want (or need) to keep the FPS/responsiveness very good. If you’re drawing hundreds of shapes and lines, for example, you’d want to use CG directly. If you’re just drawing a handful of shapes/images/text, using the Obj-C wrappers will give only a negligible performance hit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to make a Javascript object that would behave as an associative array,
Just out of curiosity i wanted to make something similar to what pretty much
This is a rather simple example and probably wouldn't make much of a difference
I really admire java features and I don't want to give up using it
In short, I want to make a background form which takes up the whole
I'm coming from the .Net camp where virtualization was much more prevalent do to
I'm having some weird issues with pytz's .localize() function. Sometimes it wouldn't make adjustments
I wouldn't usually bother to obfuscate a web application DLL but right now I
What are some reasons why I wouldn't want to disable IIS logging completely for
I have to make this overview of questions and the user has to be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.