Coder Social home page Coder Social logo

Modify values at runtime about treepoem HOT 4 CLOSED

adamchainz avatar adamchainz commented on June 8, 2024
Modify values at runtime

from treepoem.

Comments (4)

adamchainz avatar adamchainz commented on June 8, 2024

only with monkey patching at current

Can you explain your use case?

from treepoem.

misilot avatar misilot commented on June 8, 2024

I am trying to make a small and narrow code39 barcode.

I am looking at https://github.com/bwipp/postscriptbarcode/wiki/Resizing-Symbols where it is 0 0 instead of 10 10, but I think being able to modify the scale value might be more beneficial to me as that seems to at least help augment the shape I am looking for.

For example if you use the Online Generator https://the-burtons.xyz/barcode-generator/

Code39, Options: hidestars height=0.08 Scale 1 3 you get a barcode similiar to

image

If you have any other ideas on making it a small narrow barcode that would be great as well. Everything I have tried seems to result in a fairly large image.

Here is what my python looks like

        barcode_image = treepoem.generate_barcode(
            barcode_type='code39',  # One of the BWIPP supported codes.
            data=barcode,
            options={
                'hidestars': True,
                'includecheck': True,
                'includetext': False,
                'includecheckintext': False,
                'height': .08,
            })

Thanks!

from treepoem.

adamchainz avatar adamchainz commented on June 8, 2024

I think it would work to add new arguments for these parameters, however I don't have time to write the code. I think we could call the arguments scale and moveto, as tuples of x, y coordinates, and set the defaults to the current values. Would you be able to write a PR, and check it works in your fork?

from treepoem.

adamchainz avatar adamchainz commented on June 8, 2024

This is no longer required after #499, which should always calculate the bounding box correctly.

from treepoem.

Related Issues (20)

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.