drawmatrix


Namedrawmatrix JSON
Version 0.1 PyPI version JSON
download
home_pagehttps://github.com/ko4nev812/draw-matrix
SummaryAllows you to draw beautiful matrices.
upload_time2024-02-25 11:50:32
maintainer
docs_urlNone
authorkonev_runk
requires_python>=3.6
license
keywords draw matrix 2d 2d_matrix
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Drawing on a matrix #

## What is this? ##
The module allows you to create a symbolic matrix and draw different lines on it, after which you can convert the drawn lines into a beautiful structure.

## Quick Guide ##

Drawing a simple, beautiful line:

    
    my_picture = РЎanvas_matrix(10,10)
    my_picture.makeline(1, 1, 8, 9)
    my_picture.beautify()
    my_picture.pt()



----------


### Using ###


Using the library is as simple and convenient as possible:

Let's import it first:
First, import everything from the library (use the `from `...` import *` construct).

To start working with the module, you need to create an object with the class `Canvas_matrix`, in this case we are creating a 10 by 10 matrix filled with spaces:

	my_picture = РЎanvas_matrix(10,10," ")

This class has several methods that will help you master this library:

`.pt()` - prints the entire matrix, if pt = True, the garden will be printed after printing for the next print:


	my_picture.pt(pt = False)

`.makeline(x1, y1, x2, y2)` - draws a line at two points, the coordinates start at 1, that is, the coordinate at the upper left point will be `[0,0]`

	my_picture.makeline(1, 1, 8, 9)

`.point(x, y, r)` - draws a point in x, y coordinates with the same width and height r:

	my_picture.point(5, 7, 2)

`.local_draw` - stores the coordinates of the local drawing, you no longer need to count the coordinates from the origin, but only from the beginning of the local coordinates:

	my_picture.local_draw = [x, y]

`.beautify()` - Transforms a boring picture from identical symbols into a beautiful picture with different symbols:

	my_picture.beautify()

an example of drawing a simple picture:

	t = РЎanvas_matrix(10,25)
    t.local_draw = [7,0]
    t.makeline(0, 0, 4, 2)
    t.makeline(20, 2)
    t.makeline(25, -1)
    t.local_draw = [2,4]
    t.point(0,0)
    t.point(10,-1)
    t.beautify()
    t.pt(False)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ko4nev812/draw-matrix",
    "name": "drawmatrix",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "draw matrix 2d 2d_matrix",
    "author": "konev_runk",
    "author_email": "",
    "download_url": "",
    "platform": null,
    "description": "# Drawing on a matrix #\r\n\r\n## What is this? ##\r\nThe module allows you to create a symbolic matrix and draw different lines on it, after which you can convert the drawn lines into a beautiful structure.\r\n\r\n## Quick Guide ##\r\n\r\nDrawing a simple, beautiful line:\r\n\r\n    \r\n    my_picture = \u0420\u040eanvas_matrix(10,10)\r\n    my_picture.makeline(1, 1, 8, 9)\r\n    my_picture.beautify()\r\n    my_picture.pt()\r\n\r\n\r\n\r\n----------\r\n\r\n\r\n### Using ###\r\n\r\n\r\nUsing the library is as simple and convenient as possible:\r\n\r\nLet's import it first:\r\nFirst, import everything from the library (use the `from `...` import *` construct).\r\n\r\nTo start working with the module, you need to create an object with the class `Canvas_matrix`, in this case we are creating a 10 by 10 matrix filled with spaces:\r\n\r\n\tmy_picture = \u0420\u040eanvas_matrix(10,10,\" \")\r\n\r\nThis class has several methods that will help you master this library:\r\n\r\n`.pt()` - prints the entire matrix, if pt = True, the garden will be printed after printing for the next print:\r\n\r\n\r\n\tmy_picture.pt(pt = False)\r\n\r\n`.makeline(x1, y1, x2, y2)` - draws a line at two points, the coordinates start at 1, that is, the coordinate at the upper left point will be `[0,0]`\r\n\r\n\tmy_picture.makeline(1, 1, 8, 9)\r\n\r\n`.point(x, y, r)` - draws a point in x, y coordinates with the same width and height r:\r\n\r\n\tmy_picture.point(5, 7, 2)\r\n\r\n`.local_draw` - stores the coordinates of the local drawing, you no longer need to count the coordinates from the origin, but only from the beginning of the local coordinates:\r\n\r\n\tmy_picture.local_draw = [x, y]\r\n\r\n`.beautify()` - Transforms a boring picture from identical symbols into a beautiful picture with different symbols:\r\n\r\n\tmy_picture.beautify()\r\n\r\nan example of drawing a simple picture:\r\n\r\n\tt = \u0420\u040eanvas_matrix(10,25)\r\n    t.local_draw = [7,0]\r\n    t.makeline(0, 0, 4, 2)\r\n    t.makeline(20, 2)\r\n    t.makeline(25, -1)\r\n    t.local_draw = [2,4]\r\n    t.point(0,0)\r\n    t.point(10,-1)\r\n    t.beautify()\r\n    t.pt(False)\r\n\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Allows you to draw beautiful matrices.",
    "version": "0.1",
    "project_urls": {
        "GitHub": "https://github.com/ko4nev812/draw-matrix",
        "Homepage": "https://github.com/ko4nev812/draw-matrix"
    },
    "split_keywords": [
        "draw",
        "matrix",
        "2d",
        "2d_matrix"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d5c10ec807f4123904e0a33a95d47f02a82787c8b8b612302e72e664f2323bc6",
                "md5": "edf4699e4012da190401c090b6f50d27",
                "sha256": "335a28188ae1dc9d2b5620f17522220f60ddd30b8ddaa093dad89c0125a47e87"
            },
            "downloads": -1,
            "filename": "drawmatrix-0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "edf4699e4012da190401c090b6f50d27",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 7057,
            "upload_time": "2024-02-25T11:50:32",
            "upload_time_iso_8601": "2024-02-25T11:50:32.726797Z",
            "url": "https://files.pythonhosted.org/packages/d5/c1/0ec807f4123904e0a33a95d47f02a82787c8b8b612302e72e664f2323bc6/drawmatrix-0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-25 11:50:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ko4nev812",
    "github_project": "draw-matrix",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "drawmatrix"
}
        
Elapsed time: 0.23511s