mxGraph / draw.io : how to change shape default background Color - mxgraph

I'm starting to work on integrating the draw.io editor into my project
https://github.com/jgraph/drawio/tree/dev/src/main/webapp
in the initial state, the shape has a transparent background
I searched almost all files in drawio/src/main/webapp/js
replacing all 'none' or mxConstanet.None related to color with diff. colors to detect the part responsible for the shape background
but without success, please guide me the code that initiates the shape backgroundColor
Thanks you

Related

How to change the color of non-transparent parts of a PNG file with Slider UI in Spark AR

In Spark AR Studio I've set a texture to a rectangle, which is a transparent PNG with some text on it. I've applied this texture to a rectangle and have put it in the scene. What I'm trying to achieve here is to use a native Slider UI element to change the non-transparent parts of this PNG which is the "Hello World" obviously.
The best related article I could find is from their own docs: Adding a Color Filter which does the steps below:
Imports the texture in patch editor
Pipes in the RGB output into a color space patch and converts the color space into HSL mode
Unpacks the HSL values
Modifies the values somehow
Packs them again, converts back the color mode into RGB and adds an alpha value.
And finally pipes in the output (modified color values) into the material texture which is controlled as a patch
Here's my setup which is not working, and makes the whole rectangle black instead of changing the non-transparent parts of the texture.
Any ideas on how to fix this? I know I haven't added the slider UI element to my patch editor yet, at this point I'm playing around with the values in Orange groups. If that works I'm gonna let an slider, control those values.
From what I'm trying to understand, you want to change the "Hello world" to different colors using the Slider UI?
Have the rectangle's material texture in the patch editor by selecting the arrow.
Drag and drop your "Hello World" texture into the patch editor
Import the Adjust colors shader from the AR Library
In your patch editor, right-click and search for "Slider UI" and insert (Only works for Instagram thus go to "project" on your toolbar --> "Edit missing properties" and uncheck "Facebook")
Connect your "Hello world" Texture RGBA output to the texture input in the Adjust Colors Shader
Connect your "Slider UI" output to the "Hue" input in the Adjust Colors Shader
Connect your Adjust Colors Shader Output to the material "Diffuse Texture"
Click to see how your patch editor should look like
Maybe it's just your preference but I would change the "Hello World" to black & white to make it more visible as I change the colors (I use Photoshop to desaturate but any editor that works is fine)

Exported svg dosen't show text

So I wrote some text in Figma and added a stroke to it. After I exported it as an SVG file, only the stroke remained and the text(which is white) doesn't appear with it. How do I fix this so the svg I export will have the stroke and the text?
https://imgur.com/a/k6RAB2U
heres the link to the png version which works but has a lower resolution
I hope to be able to get the text in my svg file along with the stroke as well
I had a similar issue - in my case the font wasn't installed on the machine I was running on (using Inkscape). The exportef svg referred to the right font, but no conversion could be done.
If that's not the case, open the svg in your favorite editor and see what is being output - that should help with debugging the problem

Libgdx: Remove white space in a sprite

I recently started using Libgdx for the first time and I'm trying to make a 2D game similar to Zelda/Pokemon.
The problem I'm having is that I don't know how to make the sprite blend with the background (a tiled map .tmx file). I tried using enableBlending() but it doesn't work. I want the white space around the sprite to be removed so that the tiled map background shows.
tiled map with the sprite
Thanks
Blending is not required in your case.
Just use .png(having transparent background) file instead of .jpg(having white background).

How do I make an object turn black, when a movie clip animation turns black?

I have a light bulb movie clip, where it glows and burns out. I want everything in the scene to turn black when it does burn out. Like objects, movieclips, and arrays. When the light bulb comes back on, I want the objects to turn back to their original color. How do I do this?
Simple way would be to just create a black rectangle and add it to the stage when you want the lights to go out.
When you want the lights back, just remove it from the stage.
You could also adjust the alpha of that black rectangle over time or tween it to have it gradually turn black. When the rectangle has alpha set to 0, everything else's color will be as if the lights are on. Alpha set to 1, would be complete darkness.
Update - now that you have changed the question in the comments of the question by adding details that would have been helpful from the beginning :
You can use ColorTransform to change the color of your fireflies to black. Google that or search that on this site for detail.
Also, you can do this effect in the IDE by setting one frame as normal, and in another frame tint it black using a color effect on the properties panel. (Not sure what version of the IDE you have, it might be labeled differently in earlier versions)

Metro App StorageFile GetThumbnailAsync Background

In a Metro App, when retrieving the Thumbnail of a StorageFile using the GetThumbnailAsync() method, the Background Color is a Dark Blue/Navy Blue.
Is it possible to override this Color? I would like the Background to be Transparent.
From the documentation,
The thumbnail is an icon on a background of appropriate size. The background color is determined by the app that is associated with the file.
Combined with the following note:
Note If the associated app is a Windows Store app, the app's tile background color is used.
If your app has an association with the file, just make sure your apps Background color is Transparent (not 100% sure you can do that, actually).
The other option is to use something like WriteableBitmapEx to find every pixel of the tile color, then turn those pixels to Transparent. Shouldn't be too absolutely terrible, but will have an overhead (naturally).
Hope this helps and Happy Coding!