Code Monkey home page Code Monkey logo

Comments (1)

TomFyuri avatar TomFyuri commented on August 19, 2024

There is technically no trick to it. Rather when the widget itself was brainstormed I've decided that I wanted a single loop function that just draws a series of lines without pause. So let us say you want to draw S letter.

S = {
{x = 10, y = 0},
{x = 3, y = 0},
{x = 0, y = 2},
{x = 0, y = 3},
{x = 3, y = 5},
{x = 7, y = 5},
{x = 10, y = 7},
{x = 10, y = 8},
{x = 7, y = 10},
{x = 0, y = 10}
}

If you simplify it we just need to start from coordinate 10,0 then go to 0,0, then to 0,5 then to 10,5 then to 10,10 and then to 0,10.
@socdoneleft has changed some of the letters to make them less blocky and more curvy by adding more coordinates. I think he has used the some sort of program for this, but you can do this either on paper on in paint.
image
I hope my explanation makes sense. The obvious limitation of this method is that you cannot write multi-symbol characters this way, but I was mainly focused on A-Z and 0-9 characters and didn't really care about the rest that much. Also some fps-based delays were introduced because if you try to draw the entire thing in a single frame - the anti-mapdraw-spam-protection will limit the amount of lines drawn and eat the rest.
I think the rest of the code is so simple ChatGPT can rewrite it in whatever fashion you wish.
Essentially "WriteText" func figures where your mouse is and buffers whatever text you wish written. "DrawIt" and "DrawLetter" then write the letters from the text you asked for.

from bar-widgets.

Related Issues (1)

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.