matrixdraw


Namematrixdraw JSON
Version 0.0.1 PyPI version JSON
download
home_pagehttps://github.com/ko4nev812/draw-matrix
SummaryAllows you to draw beautiful matrices.
upload_time2024-02-25 11:53:42
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": "matrixdraw",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "draw matrix 2d 2d_matrix",
    "author": "konev_runk",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/64/a7/960ac18a019a5bc9eb72ed5cf1c5ecfeffb80632eda2f6dc2b0fe1fed606/matrixdraw-0.0.1.tar.gz",
    "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.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": "15466eb3ab870a978b59bfa361763e584094808104d6a6560fd857dafbc6a36b",
                "md5": "51bb67a8f7894aeddb7a5d29daeb45ec",
                "sha256": "4f1dd56c5537ca78603b2b0a495f3271eee6004009ec72b281ba118a1f01395b"
            },
            "downloads": -1,
            "filename": "matrixdraw-0.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "51bb67a8f7894aeddb7a5d29daeb45ec",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 3768,
            "upload_time": "2024-02-25T11:53:40",
            "upload_time_iso_8601": "2024-02-25T11:53:40.996316Z",
            "url": "https://files.pythonhosted.org/packages/15/46/6eb3ab870a978b59bfa361763e584094808104d6a6560fd857dafbc6a36b/matrixdraw-0.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64a7960ac18a019a5bc9eb72ed5cf1c5ecfeffb80632eda2f6dc2b0fe1fed606",
                "md5": "26854a3728489555ebd7339c1a3d7367",
                "sha256": "91d3468a711ee775bb2086437a9df2c7f971b33c4e53ab8971d3d61f432f7886"
            },
            "downloads": -1,
            "filename": "matrixdraw-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "26854a3728489555ebd7339c1a3d7367",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 3449,
            "upload_time": "2024-02-25T11:53:42",
            "upload_time_iso_8601": "2024-02-25T11:53:42.822987Z",
            "url": "https://files.pythonhosted.org/packages/64/a7/960ac18a019a5bc9eb72ed5cf1c5ecfeffb80632eda2f6dc2b0fe1fed606/matrixdraw-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-25 11:53:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ko4nev812",
    "github_project": "draw-matrix",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "matrixdraw"
}
        
Elapsed time: 0.20753s