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 7166061
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T14:21:09+00:00 2026-05-28T14:21:09+00:00

I’m writing a Python-module which should provide an easy OOP interface to low-level GUI

  • 0

I’m writing a Python-module which should provide an easy OOP interface to low-level GUI platforms. To achieve this, a wrapper class needs to be created that is used by the classes in the module.

This is the (yet) class-diagram for the basic implementation.

class diagram

This question is actually not about the design of the package, but if you have questions to it or have an idea what might be better, I won’t mind any comments/critics.

The DrawArea class is the glue between the low-level platform and the classes in the package. Events usually start here, as the wrapper should recognize mouse-/keyboard-events and inform it’s children about it.

Now, as you can see, the DrawArea class needs to implement some functions to render basic elements onto the GUI. Now, I’d like to get to know about the magic behind rendering circles, rounded rectangles, lines (with a thickness) and about anti-aliasing. One reason for it is that I’m simply interested into that topic, the other is that I’d like to deliver an implementation with the package. (Will be written in C/C++, I’m pretty sure Python would be tot slow for such rendering operations, isn’t it?)

Now my questions:

  1. Are there any good references for how to render circles, ellipses, rounded rectangles, or lines (with a thickness, the one-pixel-line is easy..)?
  2. Are there any good references for how to implement anti-aliasing?
    • E.g., is anti-aliasing done while rendering an element or applied after all rendering-operations have been done?
  3. Would it be better to use something like a Path class that will be rendered? I.e. a vectorized representation of the form that should be rendered. That would have the advantage to render any kind of 2-dimensional forms, but I don’t know how to implement it. Are there good references for rendering vector-graphics?
  • 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-28T14:21:09+00:00Added an answer on May 28, 2026 at 2:21 pm

    Anti-Grain Geometry – High Fidelity 2D Graphics – A High Quality Rendering Engine for C++ is a programming library, which is my favourite choice for rendering vector graphics.

    You might like to make a wrapper of it (take a look at documentation ), look into sources or …

    Jump to Research section where you can find a lot of information how to do : “High Fidelity 2D Graphics – A High Quality Rendering”. Brazier lines and other topics are mentioned there. My favourite section is “Texts Rasterization Exposures” about sub-pixel rendering.

    If you are interested how to optimize drawing lines, polygons etc even on C+assembly level,

    • I encourage to take look into old but great book (showing tricks needed on times of i386): Tricks of the Game-Programming Gurus by Andre Lamothe, John Ratcliff, Denise Tyler
    • IF you want more, another book : “Introduction to Computer Graphics
      James D. Foley, Andries van Dam, Steven K. Feiner, John F. Hughes, Richard L. Phillips”
      ref1 ref2

    Here as example of one of many 2D Computer Graphics algorithms:

    • Bresenham’s line algorithm which is widely used cause it only uses integer addition, subtraction, bit shifting – which are fastest instructions to execute
    • A lot of modifications, including multicore : Google Scholar: Bresenham’s line algorithm
    • Clear and readable examples how to apply Bresenham to lines, circles etc. : The Beauty of Bresenham’s Algorithm
    • Midpoint circle algorithm is classic example of how to draw circle
    • But if you’d like to have antialiasing build-in into drawing algorithm (instead of oversampling) you might like to checkout: Xiaolin Wu’s line algorithm
    • Good place to start reading about algorithms on net, but really I encourage to look into Tricks of the Game-Programming Gurus by Andre Lamothe, John Ratcliff, Denise Tyler
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I am writing an app with both english and french support. The app requests
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but

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.