Skip to content

Convert factory functions to proper python classes #43

@djhoese

Description

@djhoese

Aggdraw seems to define all of its class __new__ methods as functions in the aggdraw module. It then creates a new object by creating a new type. This is an issue because this means classes like aggdraw.Draw aren't actually classes, they are functions, and that a user has no access to the methods without creating an instance of the object. Even worse you can't use sphinx autodoc functionality to document the classes because they don't technically exist until an instance is made.

I don't think this will be extremely hard to implement, but it isn't a top priority for me. Additionally, it has a high chance of breaking something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions