Questions tagged [brushes]
47 questions
0
votes
1 answer
Brushes thread safety
According to the usual Thread safety statement.
Any public static (Shared in Visual Basic) members of this type are
thread safe
Which makes Brushes.White thread safe but not new SolidBrush(Color.White)
My first question is why, what are the…

hultqvist
- 17,451
- 15
- 64
- 101
0
votes
0 answers
Unity, terrain brushes in runtime?
so i want to create in unity a terrain in runtime. In the end it should be more procedural generated.
So far i could only found the direct manipulation of terrainData in changing the single vertices of the terrain, for example with perlinnoise. And…

GameDev Anfänger
- 11
- 1
0
votes
1 answer
How check if photoshop brush exist programmatically
I'm trying to create a Photoshop Panel for some actions, but I want to know how can I check if the brush already exist in photoshop and if not exist to call a function to install it before the action can be used, I already know how install it, and…

ozonostudio
- 119
- 2
- 6
- 13
0
votes
1 answer
Count the number of displayed VisualBrush visuals
I am working on a CAD program in WPF and I'm looking for a way to count the number of controls displayed when a particular brush is rendered.
So say I have an Ellipse:

Ross Graeber
- 179
- 2
- 10
0
votes
1 answer
Create Custom Brush With Png(transparent) Image and a Background Color
I want to create a custom brush in WPF that will be applied to a rectangle.
Fill= myCustomBrush.
theCustomBrush contains a png image (ImageBrush) ,and contanins a color in background (SolidColorBrush).
I want to create a custombrush with this two…

Khaldoun
- 487
- 1
- 5
- 25
0
votes
1 answer
Creating and using a new Brush or color using sliders and dependency properties in C#
I'm working on a project which is a basic WPF "Paint" app. I have three options, draw an Ellipse, draw a Line, or draw a 'shape' (a line where closed sections are filled in). These three options are represented with radio buttons. I have up to this…

Chris V.
- 1
- 1
0
votes
1 answer
Polyline() - change colour with an array value
I'm trying to create a very simple example of a for steps in [] loop using a Polyline() inside an IronPython WPF application. Each iteration of the loop should draw a different colour however Brushes implements a set of predefined…
0
votes
1 answer
VB.net How can I check if two brushes are the same or same color?
How can I find out if two brushes are equal
tColor1 = New BrushConverter().ConvertFrom("#FF89DE93")
tColor2 = New BrushConverter().ConvertFrom("#FF89DE93")
tColor3 = Brushes.LightGray
How can I compare these burshes and get true for tColor1 =…

donL
- 1,290
- 3
- 13
- 37
0
votes
2 answers
string with surrounding color
i want to make an image in vb.net which is a string
it should be made of 2 colors one as forecolor the other as a color surrounding the first one
how should i make it using code?
my result must be some thing like this image(yellow as forecolor and…

Hossein
- 141
- 8
0
votes
2 answers
WPF Change Style's Brush Color
I have the following styles in WPF to draw and color a box, which is a custom control with various PART_Name items defined in a ResourceDictionary:
.
.
.
#FFD69436

amarcy
- 1,485
- 2
- 19
- 28
0
votes
1 answer
Cocoa : Creating Oil Paint/Water Brushes
As per my project requirement, I wanted to create a brush which will give me a effect like oil/water painting.
Please find attached snaps of it. I've taken this snap from Microsoft Paint Application. Microsoft Paint provides different brushes and…

Omkar
- 1,108
- 10
- 19
0
votes
1 answer
C++ Direct2D Radial Gradient Brush
Hello I am using Direct2D and i am using Radial Gradient Brush but i am stuck in one place.
My radial Gradient brush Code
struct SampleWindow : DesktopWindow
{
//FOr Radial Gradient Brush
ComPtr radialBrush;
…

Haseeb Khan
- 930
- 3
- 19
- 41
0
votes
1 answer
How can a brush which is used for the BackgroundProperty of a WPF control be given a margin?
In WPF, I have a TextBox with a BackgroundProperty set to a custom brush. I want to give this brush some kind of visual buffer from the border of the TextBox. The brush is a GlyphRunBrush which acts much like an ImageBrush, but has a rasterized…

codekaizen
- 26,990
- 7
- 84
- 140
0
votes
1 answer
Paintbrush-like textured strokes in WPF
I need a way to draw lines in WPF that have a rough, textured or distressed effect, as if they've been drawn by a real brush or pen stroke. I can go some way to doing what I want using graphic elements but this approach doesn't scale very well. Any…

user814425
- 605
- 8
- 19
-1
votes
1 answer
Creating filled Squares inside Picturboxes with customly made brushes and extracted from a list
So to explain what my problem is, I made a PictureBox, and I need to fill in many FILLED squares inside of it.
However, to do so I would need to create a brush and all of the solutions I've found online are returned as errors by Visual Studio 2019.…

Darp mosh
- 1
- 3