With PlantUML I've created a little state chart for my documentation:
#startuml
state Powered {
[*] -d-> Starting
Powered -r-> Starting : Some error
Starting -d-> Operational
}
[*] -d-> Powered : Power On
Powered -u-> [*] : Power Off
Powered -d-> Powered : Reset
#enduml
(btw: PlantUML is a very nice tool to create graphical output from a textual description embedded embedded markup documents like asciidoc or reStructuredText)
This is what the given state diagram is rendered to:
As you can see the chart is drawn a bit sloppy
the "Power Off" transition arrow is not straight
the Initial/End state are swapped
the arrow from "Powered" to "Starting" looks like it's somehow connected to the "Power Off" transition
The "Starting" and "Operational" state are not aligned
As the documentation describes you have some influence on the arrow direction by writing -left-> or -l-> for short rather than just -->.
Is there a way to to influence the way how and where arrows are drawn? I'd really like to have only horizontal or vertical straight lines being drawn.
To answer the original question for future readers:
In order to have only horizontal or vertical straight lines drawn, you can use skinparam linetype ortho.
In order to make all lines straight (but not necessarily horizontal or vertical) you can use skinparam linetype polyline.
(source)
PlantUML has not been designed to provide nice straight arrows when many directions are imposed. Using default layout provides cleanest and most readable result to me.
Here is an example with the same meaning, but without layout issues:
#startuml
state Powered {
[*] --> Starting
Starting --> Operational
}
[*] --> Powered : Power On
Powered --> [*] : Power Off
Powered --> Powered : Reset
Powered --> Powered : Fatal Error
#enduml
EDIT: I also changed your Powered --> Starting : Fatal Error transition to : Powered --> Powered : Fatal Error, which better expresses that from any state within Powered, a Fatal Error event will restart at the Starting substate.
Alternatively the two statements:
Powered --> Powered : Reset
Powered --> Powered : Fatal Error
can be merged in:
Powered --> Powered : Reset, Fatal Error
see OMG UML 2.5 format specification section 14.2.4.9 page 329
[<trigger> [‘,’ <trigger>]* [‘[‘ <guard>’]’] [‘/’ <behavior-expression>]]
Related
I generated a table with iText7 (C#):
var cell = new Cell().Add(new Paragraph(headers[c]).SetFont(font).SetFontColor(ColorConstants.WHITE).SetFontSize(size).SetBold());
cell.SetBackgroundColor(color);
cell.SetTextAlignment(iText.Layout.Properties.TextAlignment.CENTER);
cell.SetPadding(0);
cell.SetBorder(new SolidBorder(1));
table.AddCell(cell);
Document has the table, but on certain scalings, it looks weird on the edges:
Taking a closer look on the image above:
If however I change the zoom in the viewer directly, it looks OK:
How do I get rid of these unnecessary parts from the border?
I'm attaching here the resulted PDF for reference:
Download sample PDF
I also noticed that on iText KB pages, there is this kind of behavior:
https://kb.itextpdf.com/home/it7kb/faq/how-do-i-change-the-border-color-of-a-pdfpcell
See the red and blue bars' left edges:
This behaviour is not uncommon in PDF or other print drivers where vectors are printed rather than plotter definitions (often called "Dangles". It would be worse if the definition was rounded or square, rather than butt, and join as "mitre" cannot apply, see below). The overlap is intentional (to ensure both lines are inclusive). In a laser drum print that may be desirable overkill, but disastrous for any inkjet or screen. It looks like the cell is not bordered by a box, but using common straight vectors. Again this is often desirable optimisation but not when the weight is not honoured. Thus it depends if the viewer is using the correct thickness.
All desktop PDF viewers (icluding Chrome and FireFox) I tested showed the lines correctly as clean overlap without "Dangles". Acrobat has a reputation for undesirably thickening or thinning its standard defined lines depending on its user settings.
I am doing animation of algorithms using VHDL on Altera DE1. In this project, I have to display text to make it more informative. I am new to FPGA. But, I learned how text display works (all about allocating memory to each character and then display it). I tried to search some programs to test and see how the text display actually works. But most of them are on different boards. I wan't to understand how the actual flow is. As in, understanding just the memory and how it works is not helping me to write a complete code. Can anyone point me to right direction or explain in DEPTH how it actually works?
Thanks in advance!
If you haven't checked it out already, make sure to browse OpenCores. It looks like there are several VGA cores, some with text only and some with both text and custom graphics. You may need to register to view/download but it's free and simple.
Also many of the projects there are manufacturer-independent, making it very straightforward to integrate into your code.
What you said here is true, but the VGA controller is made out of several parts, one that creates the correct timing for the VGA signals, a memory from which the controller takes the data from and shows on the screen, a character map (the font) and a controller to read the mapping of each character and place them on the right position on the screen.
And here you have a higher level of block diagram, the previous block will replace the block markes as "Algorithm Test Pattern Generator"
You can take a look at the example on Digilinet's web site:
VGA controller reference design
Download it and modify it so it fits your need. This is just to give you an idea of the blocks necessary for what you want to do. It can be made simpler if you just want to show the same characters, or more complicated if you want to create a character based graphic controller for your design.
I'm studying this example
http://mrdoob.github.com/three.js/examples/webgl_morphtargets_md2_control.html
found on this site:
http://mrdoob.github.com/three.js/
1) What should I change in the html file to run the animation "jump"?
2) Where can I find the files that contain the rules for the animation of the character?
The given example is ment for user to control the movement by keyboard input. If you look closely you'll see an eventlistener that allows you to make the charaters run by pressing 'W'.
I'm trying to make a program in LabVIEW to adjust the brightness of an image.
I'm increasing the brightness by adding a specific value to every red, green and blue value.
I get that value by my moving the slider.
I have made the program with the formula node but it always gives an error.
I hoped you can help me.
Block diagrams:
Error:
Error on line 6 is marked by a '#' character: "...Blue; int truncate(#int value); new"
There's a function for this shipped with LabVIEW it's called hilite color:
(this image is a snippet that you drag and drop directly to your VI block diagram)
Ton
Correct me if I am wrong, but I though it was not possible to use C-like functions inside Formula Node. You'd need to use LabVIEW to limit the range. I've attached the screenshot of the equivalent code, but I am sure there's a more efficient way of changing image brightness.
I would like to use LabVIEW to capture the waveform already displayed on the screen of my Agilent oscilloscope (model 54642D). With this waveform, I would like to obtain the current settings of the oscilloscope-channel as well (volts/div, time/div, probe attenuation, delay, offset, cursors with frequency/period, etc.). In other words, I acquire a signal with the scope (not LabVIEW), adjust the scope settings to my liking on the front panel of the oscilloscope, and then I would like to capture the exact waveform displayed on the scope screen WITH the settings of the oscilloscope.
I have been using the project-style driver, found here: http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=724
This works for controlling the oscilloscope settings and acquiring a waveform, but it's not what I want. I simply want LabVIEW to capture the current state of the oscilloscope display and settings used.
For the solution, please visit the following link on NI's forum:
http://forums.ni.com/t5/LabVIEW/Acquiring-Agilent-54642D-Oscilloscope-Waveform-AND-Settings/td-p/2157218#M695868