Skip to main content

No project description provided

Project description

DoGL (Drawing OpenGL) ����

Overview

DoGL is a powerful, flexible 2D graphics library built on Pygame and OpenGL, designed to simplify the process of creating interactive and visually appealing 2D graphics, visualizations, and simple games. With an intuitive API and extensive customization options, DoGL makes graphic programming accessible and enjoyable.

���� Features

Comprehensive Shape Drawing

  • Draw a wide variety of shapes with unprecedented control:
    • Circles
    • Squares
    • Triangles
    • Polygons
    • Stars
    • Hearts
    • Lines
    • Arcs
    • B��zier Curves
    • Ellipses

Advanced Customization

  • Rotation support for all shapes
  • Fill or outline rendering
  • Custom color selection
  • Texture mapping
  • Partial shape rendering (e.g., quarter circles, specific polygon sections)

Interactive Controls

  • Keyboard-driven movement
  • Boundary constraints
  • Custom key mapping

Rendering Utilities

  • Grid scaling
  • Text rendering
  • Background image support
  • Coordinate system helpers

���� Installation

Prerequisites

  • Python 3.7+
  • Pygame
  • PyOpenGL
  • Pillow (PIL)

Install via pip

pip install dogl

Manual Installation

git clone https://github.com/yourusername/dogl.git
cd dogl
pip install -r requirements.txt

���� Quick Start Guide

Basic Window Initialization

from dogl import init_window, magic, end, scale

# Initialize a window
init_window(800, 600)

# Main rendering loop
running = True
while running:
    running = magic()
    
    # Add your drawing code here
    scale()  # Optional: draw coordinate grid
    
    end()  # Swap buffers

Drawing Shapes

Circle

from dogl import circle

# Basic circle
circle(center=(400, 300), radius=100, color=(1.0, 0.0, 0.0))

# Partial circle with rotation
circle(
    center=(400, 300), 
    radius=200, 
    section="top_left", 
    rotation=45, 
    fill=False
)

Square with Texture

from dogl import square

square(
    center=(400, 300), 
    size=150, 
    rotation=30, 
    image="background.png"
)

Interactive Movement

from dogl import move, heart

# Movable heart shape
position = (400, 300)
while running:
    position = move(position)
    heart(center=position, size=20)

���� Advanced Usage

Custom Polygon

from dogl import polygon

# 8-sided polygon with custom color
polygon(
    center=(400, 300), 
    sides=8, 
    radius=200, 
    color=(0, 1, 0), 
    rotation=40, 
    fill=False
)

B��zier Curve

from dogl import bezier_curve

control_points = [
    (100, 100), 
    (200, 300), 
    (400, 300)
]
bezier_curve(
    control_points=control_points, 
    color=(1, 0, 0)
)

���� Color and Texture

  • Colors are specified as RGB tuples (0.0 - 1.0)
  • Supports both solid colors and image textures
  • Rotation and transformation options for all shapes

������� Input Controls

  • Keyboard movement with custom key mappings
  • Boundary constraint options
  • Easy integration with game-like interactions

���� Modules

  • init: Window and display management
  • helper: Utility functions
  • control: Input handling
  • Shape modules: Circle, Square, Triangle, etc.

���� Performance Considerations

  • Built on OpenGL for hardware-accelerated rendering
  • Lightweight and minimal dependencies
  • Suitable for educational projects, data visualization, and simple games

���� Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

���� License

Distributed under the MIT License. See LICENSE for more information.

���� Acknowledgments

  • Pygame Community
  • OpenGL Developers
  • Python Graphics Enthusiasts

���� Contact

Project Link: [https://github.com/yourusername/dogl] Created by: Mahmoud Hany Fathalla


Happy Coding! �����������������������������

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

doogl-0.2.2.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dooGL-0.2.2-py3-none-any.whl (1.4 MB view details)

Uploaded Python 3

File details

Details for the file doogl-0.2.2.tar.gz.

File metadata

  • Download URL: doogl-0.2.2.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.7

File hashes

Hashes for doogl-0.2.2.tar.gz
Algorithm Hash digest
SHA256 fed5e06b543bd72ccd3a9b722a94fe67a0e62bbafcee23187956d26ad9290f4d
MD5 4396b0a29f2d249455a7d31e26449641
BLAKE2b-256 8335701ab20a9f862541b2bc0d9f228798e7970409f1bf6105ba3a53426ecb92

See more details on using hashes here.

File details

Details for the file dooGL-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: dooGL-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 1.4 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.7

File hashes

Hashes for dooGL-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 32d6c8624f760ac956d5d3eac2cb3eb8a2ef40400f7e5ad7cc2ce3af298831cb
MD5 2fae6ba990b9c94e74030deb583b1e70
BLAKE2b-256 65eaa1a9ffa9ea874d9ed4e3c4058255d2d3b1c5323ed448825e3c1a4e9a2c95

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page