I have inserted one image in the tree body in one of my columns with
new TreeImagePainter(true, GUIHelper.getImage("right"), GUIHelper.getImage("right_down"), image);
in class TreeConfiguration, but I need to add one more image beside root rows.
Moreover I need to dynamicly obtain this image from some other class, where data is already read . As it turns out i can't because either this class is null or it is called later than it should. Could you guild me how to do that.
Kind Regards
The painting of the tree structure with node icons etc. is done by the IndentedTreeImagePainter. The TreeImagePainter is used as a decorator to the base painter for the content (typically text). If you need an additional icon you need to wrap the IndentedTreeImagePainter with another CellPainterDecorator.
Or in case the additional icon should be on the right of the tree icon, maybe the base painter can already be a CellPainterDecorator that combines both, an ImagePainter and a TextPainter.
If you only want to show that icon on root nodes, you will need some more customization, probably with a custom painter.
Sorry, I don't really understand your requirement.
Related
After rendering or some other actions, I want to read the target image into cpu.
For this, there is need first to do layout transition and change the image's current layout (old layout ) to a new one that allows transferring its data into stage image - VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL.
For transition operation, I need to give both, the current layout and the new layout.
But how do I know what is the current layout ? - each render pass may set the finalLayout to a different value, it also may that some transitions where done by the time.
A solution I think is to store per image its current layout and set it after each render pass , and after each transition operation.
Is this correct?
But how do I know what is the current layout ? - each render pass may set the finalLayout to a different value, it also may that some transitions where done by the time.
Yes, but you created those render passes. You issued commands to use those render passes on that image. Therefore, at any point in the command stream, you know what layout the image is in.
Vulkan expects you to be aware of what you've done. How you pull that off is up to you. Maybe you always leave the image in color-attachment optimal. Maybe you explicitly keep track of it with some higher-level layer. It could be any number of things.
But at the end of the day, it's up to you. With great power, comes great responsibility.
In the SceneKit editor, if I copy a node, either using copy-paste or via option-drag, the resulting node is somehow "linked" to the original. Attempting to modify this new node in any way other than position changes the attributes of the original as well. This is infuriating, how do I "unlink" a duplicated node from the original?
UPDATE: Per request, here is a video of the behavior I am describing: https://www.dropbox.com/s/vtcom4iejjdtjv0/SceneKit%20Weirdness.mov?dl=0
By Apple documents
However, it also means that changes to the objects attached to one node will affect other nodes that share the same attachments.
https://developer.apple.com/documentation/scenekit/scnnode/1408046-clone
When yor copiying node in editor it actually makes a clone node.
I am not aware about the default values of geometries, but if the geometry specified as shared then all the similar clones will get changed when you are changing one of them.
In your case you just have to click the Unshare button to let the clones to use a distinct copy of the geometry.
Which will not be affected by another node changes.
I'd like to append a border (20px white) to an image, save as a new jpeg image (orginal image with a border), I don't know how do I start. Can anyone give me a direction or code example?
Thanks
You have two ways to do it:
On your UI, wrap the image with a Border element with the correct settings and use new WriteableBitmap(borderElement, null) to create a new WriteableBitmap which you can then save using the SaveJpeg extension method.
Your other option is to use the WriteableBitmapEx class library to graphically add the graphical elements you want.
I've used both. The advantages for (1) is that there's less hassle in the sense of adding a dependeny on another DLL. The advantage in (2) is that you don't need to mess with your UI to create the image.
I'm creating a library of UI elements, and I want the graphics to be custom. At first, I was going to draw everything with code, and take properties such as "background-base-color", "background-gradient-color", etc. I was concerned that the user would need to modify too many properties and might get confused. I eventually talked myself into using external graphics, such as button_top_left_over.png and etc. Now I'm back and forth. I want people to easily be able to change the skin, so my options are, have them create external graphic libraries, or have them update properties in a front end that would write to XML, such as background-base-color, background-base-highlight,etc. Anyone have experience with this, and can offer advise?
You may "guess" gradients by a given single color, and it should fit in the most of the cases. Here is an algorithm: ColorUtil.as
Customizing components is a common problem. The user shouldn't need to step that deep into the implementation but we sill want a maximum of flexibility. For that, I have created a CSS framework: Jakute Styling Engine. Using Jakute you may set up your component using states.
Instead of declaring tons of properties for each state:
Button top_left_over: red.png
Button top_left_down: blue.png
Button top_left_disabled_over: grey.png
With Jakute you may specify stateful rules:
Button:over top_left: red.png
Button:down top_left: blue.png
Button:disabled:over top_left: blue.png
In this case the user only needs to know the list of button states and the single property "top_left". The styles can be loaded from an external style sheet or directly set to the component.
Finally, here is an example that shows you how to create a stateful styleable component: States Example. Even if you are not plan to incorporate Jakute, you might get an idea of how others create such components. :-)
I am having problems with a table containing checkboxes in Word.
I am working with a table containing 10 checkboxes. Next to this table, there is an image.
When the user checks one of the checkboxes, something has to be added to the image, i.e. the image is further completed.
However, the order of checking the checkboxes is not fixed or defined, so there are lots of different combinations.
Is there a way to add the additional parts to the original image, linked to the checkboxes? Or is this way too advanced for Word?
Word doesn't have this type of built-in functionality with images. There are too many state combinations for the checkboxes to make an image for each state in advance. One possibility could be to find a dll or ocx and draw the image programatically (advanced). Another would be to edit your image in photoshop and cut it up into 10 separate files using a transparent background. You could then add and remove layers to wherever you are displaying your image and control the z-ordering with vb.