Cocoa Objective-c line drawing

Posted on 2005-04-14
Last Modified: 2013-12-26

Whenever I draw lines in NSView, the lines appear blurred and are not sharp.
What can I do to avoid this?

I have seen many links regarding this topic ... but none worked.
So, a sample xcode project for this would be great..
Question by:venkateshwarr
    LVL 6

    Accepted Solution

    Have you tried turning off the antialiasing? You can do this by invoking the following call before doing the drawing:

    [[NSGraphicsContext currentContext] setShouldAntialias:NO];

    LVL 12

    Author Comment


    It worked! Thanks for ur help

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Title # Comments Views Activity
    Importing  SSL Certificate into Firefox using GPO 28 180
    Perl Awk Need Help 3 85
    fizzArray  challenge 1 28
    Problem to event 3 26
    Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
    Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now