Giter VIP home page Giter VIP logo

Comments (10)

monkstone avatar monkstone commented on September 28, 2024
def setup
  size 400, 200
  string = "dddddddddddddddd"
  textlen = text_width(string)
  text string, 100, 100
  stroke 0
  line 100+textlen, 89, 100+textlen, 102

  string2 ="drawerrormmmmmmm"
  textlen2 = text_width(string2)
  text string2, 100, 120
  line 100+textlen2, 109, 100+textlen2, 122
end

width

Looks OK to me!!!!

from ruby-processing.

marcel12bell avatar marcel12bell commented on September 28, 2024

screen

from ruby-processing.

marcel12bell avatar marcel12bell commented on September 28, 2024

... it only worked one time! now the same error. perhaps osx related buck?
Update: I'm getting closer to reproduce the right display...

Answer: It's not "stroke 0". And the short example code did not work here, but in my app I had to change the size option and put it also in the draw methode...

from ruby-processing.

monkstone avatar monkstone commented on September 28, 2024

v. strange your display did look a bit wonky in the first place note, how my line really matches text. If you have a retina display you really need 7u40 java, even then I'm not sure processing guys fixed it.
Here is link that might help? @marcel12bell
https://forum.processing.org/topic/strange-textwidth-behavior-ideas

from ruby-processing.

monkstone avatar monkstone commented on September 28, 2024

@marcel12bell can you check if the problem persist with latest release (2.3.0)

from ruby-processing.

marcel12bell avatar marcel12bell commented on September 28, 2024

I had to update the sha1 checksum for processing-2.1 and jruby in the rakefile, there where recent updates...
After installing the new version the problem still persists. Sorry for the news...

from ruby-processing.

monkstone avatar monkstone commented on September 28, 2024

@marcel12bell Thanks for checking, I know where I went wrong with the checksum, I corrected checksum in master first. But then I needed to check the Rakefile (in my develop), because zipped folders had changed. So I copied develop Rakefile over master (reversing my checksum doh!).
Just for completeness I re-ran above test on linux, and now I see slight error myself, black-line inside leg of last 'm' clearly not as bad as your case, but an error. However when I use P2D renderer (instead of default JAVA2D), alignment is spot on again. This won't help you because in my experience watch does not work with P2D renderer.

from ruby-processing.

monkstone avatar monkstone commented on September 28, 2024

The P2D renderer is now usable with rp5 watch (using development version of processing ie pre processing-1.1.2 and the latest ruby-processing from rubygems.org). I just retested above code with both P2D and Java2D (on my linux box) and alingment was good with both. @marcel12bell

from ruby-processing.

marcel12bell avatar marcel12bell commented on September 28, 2024

cool, I'll check it next week!

from ruby-processing.

monkstone avatar monkstone commented on September 28, 2024

Hi @marcel12bell if you are still interested @benfry reports that processing-3.0 is working OK processing/processing#2175 (comment) to use that you will need to use JRubyArt instead of ruby-processing, which is staying on processing-2.2.1.

from ruby-processing.

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.