Coder Social home page Coder Social logo

tblockref's Introduction


from tblockref import Reference
ref = Reference(scale = 2, margin = 6)

This is the class constructor. It allows setting up base properties of the reference chart.
scale
Sets the amount of pixels representing one pixel on a sprite. The default value is 2. One pixel in a sprite is two screen-pixels wide (just like in the game).
margin
Sets the amount of white space at the edges of the chart expressed in pixels. Default value is 6.

ref.column(width = int)

Resets block position back to the top and creates a new column in the chart.
width
Specifies the width of the new column. Values too small will result in overlap between columns.

ref.block(block_name = None, file_name = None)

Places a block in the chart, its sprite and name. Checks the modification date on existing local files. If no local resource for the sprite is found attempts to download off the wiki.
block_name
Specifies the name of the block to be placed. When name in an empty string or no name is provided a break in the column is created instead (see ref.space())
file_name
Specifies the name of the sprite image on the wiki. If no name is provided a guess is made based on block name.

ref.space()

Creates a break in the current column leaving empty space.

ref.embed()

Embeds all currently included block sprites into the svg file.

ref.out(file_name='output.svg')

Save the reference to a file. file_name
Specifies the path to file and filename.

tblockref's People

Contributors

mrocza 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.