Questions tagged [brush]
406 questions
0
votes
2 answers
Read-only access to brush in Backgroundworker
I have a list of objects which among other properties contain a Brush (property name "Color").
In a Backgroundworker I want to write the contents of these objects to a file.
Everything works fine until I try to read the color of the brush…

tabina
- 1,095
- 1
- 14
- 37
-1
votes
1 answer
WPF XAML Apply Opacity to Brush Only
I have read that for better performance, you should apply opacity to the foreground/background brush rather than the entire element. That is what I am trying to do, but I cannot figure it out.
Here is my XAML that works, but is setting the entire…

javaturkey
- 27
- 5
-1
votes
1 answer
i coded a coloring brush but it is not working in p5js
I was creating a mouse-based painter app. I wanna a brush whose color is chosen by a color picker in p5js. And I think I finished coding, but it's not working at all... and is there anybody who can help me? I wanna see where I did make…

rose
- 49
- 6
-1
votes
1 answer
How can I change the color of a D3 brush
I seem unable to override the default (gray) colour of the D3 brush.
Here's a snippet that I think should work:
d3.select(this.$el).select('#brush');
.style('fill', '#569fd5')
.call(brush.on('end', brushended));
I'm expecting to see a pale…

btk
- 3,158
- 2
- 29
- 30
-1
votes
1 answer
How to set d3 brush extent on load
Here I'm trying to draw a brushable bar chart. Following are the lines of code I have used.
var barchart = function(width,height,id,data,d3){
var focusGraph;
var margin = {top: 10, right: 10, bottom: (height*.2), left: 40},
margin2 = {top:…

Stanly Johns
- 39
- 1
- 5
-1
votes
1 answer
Convert IEnumerable into a brush
I have an IEnumerable of Color which I want to use as the basis for a brush.
At the moment, I convert the IEnumerable into a Bitmap, into a bitmapsource, into an imagebrush, but this is a bit slow, is there any brush class which can do what I want…

Nattfrosten
- 1,999
- 4
- 16
- 21
-1
votes
1 answer
Drawing circles on top of a form
I've got a WinForms app and I want to programatically draw circles on top of certain areas. I'm running into a couple problems and any insight would be appreciated!
1) I've got code for drawing and clearing the circles (see below), but the circles…

derekantrican
- 1,891
- 3
- 27
- 57
-1
votes
1 answer
D3 Brush events - which brush was moved? The left one or the right one?
Hopefully the title says it all.
I am handling a D3 brush moved event. And am trying to work out, whether the user moved the left brush or the right brush...?
I really want to avoid storing the mouse position somewhere.
Is there are relatively easy…

markthekoala
- 1,065
- 1
- 11
- 24
-1
votes
2 answers
how to use color selected from color dialog be used as brush color for printing
I need to know how to use the color that the user has chosen from a color dialog to create a brush so that it can print in color
Please help i've been at it for days yet still nothing

Gamehakerz13
- 21
- 4
-2
votes
1 answer
Converting Brush to SolidColorBrush WinUi 3
Im moving WPF project to WinUi 3.
I would like to convert Brushes.Red/Green to SolidColorBrush. It's used by xaml elements' properties like Background.
public SolidColorBrush PowerBrush
{
get
{
if (_powerMode == PowerMode.Off)
…

Marek Pio
- 49
- 8
-2
votes
1 answer
c#: color[] to brush[]
How can I convert color[] into brush[]? I have tried:
for (int i = 0; i < cor3_local.length; i++)
{
Brush cor_local = new SolidBrush(cor3_local[i]);
}
but the cor_local gets no value.
cor3_local is color[5].

motipai
- 328
- 3
- 10
-2
votes
1 answer
MATLAB: 2015a Brush Issues
I am writing a GUI in GUIDE and need to read brushed data from any of 3 axes. I kept recieving a callback error. Initially, I thought I was failing due to my inexperience. However, following further research, there are some suggestions that the…

DeeWBee
- 695
- 4
- 13
- 38
-2
votes
1 answer
how to make soft brush
please does anyone know how to make soft brush like this in C sharp (Windows forms)? I couldnt make it work using Texture or gradient brushes, I need to use it for freeline panting. So the user will draw with this soft…
-2
votes
1 answer
WPF gradual change in color
I am developing a simple game, using WPF. I need to change color of the brush gradually between blue, green, yellow, red, etc, without abrupt visible change in the color.
Is there a way I can use the color values to achieve this? I tried using…

Vikram Bammanhalli
- 13
- 1
- 5
-3
votes
1 answer
Zoom and select in a d3.js ARE NOT WORKING
Im trying to select data after zooming but d3.event.selection is always getting same values. Any one have an idea please ?
private zoomChart(DataType: any[], color) {
this.createChart(DataType, this.t, color);
this.zoom =…

thouraya
- 135
- 2
- 11