Comments (1)
Help page https://www.numworks.com/manual/python/ indicates:
"draw_string(text,x,y,[color1],[color2])
Displays text from the pixel x,y. The arguments color1 (text color) and color2 (background color) are optional.
"
So text begins to the x position but it indicates nothing about how "\n" is dealt with so going to the beginning of the line after \n isn't wrong.
Anyway, if we want to change the behaviour, the code dealing with this part is in kandinsky/src/context_text.cpp (KDContext::drawString method)
80 if (codePoint == UCodePointLineFeed) {
81 assert(position.y() < KDCOORDINATE_MAX - glyphSize.height());
82 position = KDPoint(0, position.y() + glyphSize.height());
83 if (origin().y() + position.y() >= Ion::Display::Height) {
84 break;
85 }
86 codePoint = decoder.nextCodePoint();
87 }
if we change line 82 with:
position = KDPoint(p.x(), position.y() + glyphSize.height());
it seems to work.
Remark: if we use position = KDPoint(position.x(), position.y() + glyphSize.height());
it doesn't work, the next line is shifted to the right.
from epsilon.
Related Issues (20)
- [Python] Ask for confirmation when deleting a Python script
- [Python] TypeError: 'list' object isn't subscriptable HOT 1
- [Python] Add the error classes to the python catalogue HOT 1
- [Python] Add classes to the "functions" catalogue HOT 1
- ANOVA function = Looking for significant differences between 3 or more sample means. HOT 1
- [Python] Add a library to easily create GUI such as tkinter HOT 3
- [Emulator] Add a flag to run a third party app HOT 1
- Micro-python idées d'amélioration
- In the module turtle, color() doesn't change the color of write() HOT 5
- Share same stockage for app .nwa than for python files HOT 1
- Missing constants HOT 2
- Make Ans be able to be deleted all at once
- Exact values of minimum, maximum etc. in Grapher app
- [SUM/PROD Improvement] Please increase k_maxNumberOfSteps HOT 2
- Please add a Spyro clone to the software suite HOT 1
- INFO: Could not init video
- Problème d'échelle automatique sur le graphique dans le menu Regression
- Écriture scientifique
- When graphing, the numworks calculator gives wrong answers for the minimum point of a quartic graph for example: x⁴-16 HOT 1
- + and - not working for ion module in the browser (when developing my scripts online)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from epsilon.