Coder Social home page Coder Social logo

desktoppencil's Introduction

Desktop Pencil

This python package will allow you to draw small images on top of everything on your screen. You will be able to rotate and resize your image before drawing them. Desktop Pencil support many image file formats such as PNG, JPG, GIF and ICO. Desktop Pencil is best at drawing small images with few pixels.

Installation

If you have PIP installed you can simply run this command: pip install DesktopPencil The package is uploaded to PyPi and can also be installed here.

Exampel 1

This exampel will draw a frog on the screen for 5 seconds. The load function returns a list with all the needed pixels including the position of them.

import DesktopPencil

frog = DesktopPencil.load("frog.png", 50, 1005)
DesktopPencil.draw(frog, 5000)

DesktopPencil.load()

Rotation and size are optional arguments.

  • file - The image you want to draw
  • start_pos_x - Start position horizontal
  • start_pos_y - Start position vertical
  • rotation - Image rotation eg. 90
  • size - Image size in tuple eg. (50,100)

DesktopPencil.draw()

Duration is an optional arguments.

  • pixels - List returned from the load function
  • duration - How long the image is visible in milliseconds eg. 3500

Exampel 2

import DesktopPencil

exampel_image = DesktopPencil.load("exampel.jpg", 0, 70, rotation=270, size=(70,100))
DesktopPencil.draw(exampel_image)

desktoppencil's People

Contributors

ingvarhk avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.