Draw Text under some angle with specific font - scichart

I am trying to draw text inside columns of bar chart. In order to do that I am using DrawText of IRenderContext2D. But it does not allow me to specify angle under which text need to be rendered and also does not allow to specify font.
I can't use annotations as they are WPF elements and will slow down my chart (I will have text for each column).
Is it possible to do this?

I'm afraid as of v4.0, without changing the code base, there is no way to specify an angle when using IRenderContext2D.DrawText in SciChart

Related

How does centering of a Tk canvas text widget work?

I noticed an artifact when placing a centered canvas text (\u25a1) widget above a centered rectangle widget with same x:
Having worked with font rendering once or twice I realize there are multiple possible definitions of "centered". Now I wonder which Tk canvas text uses.
In my previous projects I've used (pen+text.advance)/2, where text.advance is the accumulated advance width of each character. This is what I would assume Tk is using based on the behavior I'm experiencing.
However, another possible way to center text would be to center using the accumulated bitmap coverage, measured from the left-most character bitmap left edge to rightmost bitmap right edge. I believe it is more likely what I would want.
Q1: How is Tk canvas text centering supposed to work in terms of font metrics?
Q2: Is the behavior I'm seeing a bug, or possibly underspecified?
Edit: Working with it some more the square symbol is sometimes aligned with the rectangle, sometimes not. Probably some rounding error. Question is whether or not it is a bug.
Edit 2: Adding 0.5 to x seem to put the square in its right place. Maybe pixel origin is defined differently for rect and text?
Tk uses the logical properties of the font to determine what space to give text. In particular, it asks the font engine to measure the length of a piece of text (typically in one font and without newlines or tabs) to determine the bounding box of that text. It then decides where that bounding box should be (depending also on the anchoring rules, the sizes of other lines, the justification rules, the rotation setting when on a canvas, and so on) and finally asks the font engine to draw the text within the box, i.e., from the origin point within the box (which isn't the top-left point IIRC, but might actually be the leftmost point on the baseline — I let Tk handle the details of this to be honest).
From there on, it's up to the font engine (which cares about the details of cumulative error, a non-trivial concern when text is at any angle not parallel to an edge of the window), and as long as it stays within the bounding box Tk is happy.
Tk's canvas works with floating point coordinates, but on most platforms it rounds those to integers when rendering. (The exception is on macOS, where the platform drawing engine itself accepts floating point coordinates and all graphical output on the canvas is subject to good subpixel rendering. This can cause something of a change in how canvases look on that platform, even though there's no change in model; arguably, that's closer to how they're supposed to look too, and you end up with the same sort of thing if you convert a canvas's display to embedded postscript.)

How to draw a filled square behind text in libgdx?

I am developing a grid based game in libgdx. What i want is to know how can i draw a square tile with number written on it which can be moved and scaled.
Its stupidity to design thousands of textures for these numbers and use them as sprites.I want to know if there is any container class in which i can dynamically add text and and set background too.
You can use Scene2d UI components such as Label to create styled text boxes.
Scene2d allows you to do layout and styling of a wide range of components that can easily be manipulated using Actions, or you can create your own components by extending Actor.
To create and display a Label, create a Stage and add the Label to it.
In this context I assume you by "tile" just mean a rectangle.
You don't say anything about what you are doing now. How you draw the numbers.
So this answer is based on almost zero information.
Solution 1:
Use a font with a background color.
Solution 2:
You know the number/how many digits. You know the size of the font. Calculate the size of the text on screen. Use a single narrow background sprite and tile it behind the text.
Solution 3:
Use a textbox from Scene2d.

Moving a separate glyph in TextField/TextBlock/TextLine

I want to make an RPG-like animation with text, like waving, shaking, etc. So I need to move separate glyphs in in text container. I looked up in Adobe documentation, but didn't find myself any information about accessing separate glyph graphics, to change it's position/scale/whatever.
Is it possible? Or the only way to do it is to draw glyphs separately from text field to BitmapData and do the whole thing by myself?

Can we add the Word Art style in flex

Can we add the WORD ART or WARP TEXT style in flex
etc
Just like these images i want to make test like bottom arcs, vertical arcs, Birdseye etc as as shown in the images above.
Please help me is that possible in Flex to make such text fonts styles
you can do an envelope distort
envelope-distort-with-actionscript (download source)
First you will draw your textfield to a bitmap using the myBitmap.draw(myTextField). Then you will use the code below to distort that bitmap.
You can either let the user control it or you could set the handles visible to false and set their x,y to preset positions to achieve different effects.
Are you building a tshirt design tool? I created one of those years ago and had effects like this.
I have found a link where we can obtain the word art style in flash which will be very useful for all click here

html5 canvas draw text with mutiple font

How can i fill text in the canvas with mutiple font.
I can be able to fill in canvas this:
This is an example of what I want to do
this is another example of what I want to do
I know that i can slpit the sting and do first fill the normal text, second the bold text, and third the rest of the text. but i want to be able to drag and drop the text, so i cant do in that way.
Sorry, you're out of luck. There's no easy way out here.
You have to call drawtext at least three times if you want text with a bolded word in the center.
There may be a time in the future where you are allowed to draw arbitrary html, the spec mentions this is a real possibility, but that won't be for some time. To quote the spec:
Note: A future version of the 2D context API may provide a way to render fragments of documents, rendered using CSS, straight to the canvas. This would be provided in preference to a dedicated way of doing multiline layout.
From the end of this section.
You can of course still drag and drop, you just have to have a list of elements and their locations that make up a "node". Much more complicated objects have been done in the canvas no doubt.