Questions tagged [brush]

406 questions
10
votes
2 answers

Brushed steel brush in WPF?

I am looking for ideas to create a WPF Brush with a brushed steel look, similar to the MacOSX Panther style, preferably without resorting to an ImageBrush. Is there a funky way to use a GradientBrush to create this effect? Thanks in advance!
Jens
  • 25,229
  • 9
  • 75
  • 117
9
votes
3 answers

How to create this type of brush for paint in android

Possible duplicate How to make custom brush for canvas in android? Hello friends, I am too stuck to create this type of brush for paint application, but didn't find anything related to this. I am new to paint/canvas so I don't have knowledge about…
Pratik
  • 30,639
  • 18
  • 84
  • 159
9
votes
1 answer

Is there a graphical overview of the HatchStyle enumeration?

A hatch pattern is made from two colors: one defined by the BackgroundColor, which fills the background and one for the lines that form the pattern over the background defined by the ForegroundColor property. The HatchStyle property defines what…
mafu
  • 31,798
  • 42
  • 154
  • 247
9
votes
1 answer

What is a "brush"?

The docs go right into the details of using the "brush" API without ever describing what a "brush" is. I can make my own educateded guesses, of course, based on the examples given in that page, but I'm looking for a more formal introduction to what…
kjo
  • 33,683
  • 52
  • 148
  • 265
8
votes
2 answers

WPF SolidColorBrush dilemma

Does anyone know how to convert a string that represents a color into a SolidColorBrush in WPF? For e.g: string colorRed = "Red"; SolidColorBrush fromStringToColor = new SolidColorBrush(colorRed); That's sort of what I'm trying to accomplish. Any…
CODES_ONLY
  • 181
  • 2
  • 11
8
votes
2 answers

calculate selection brush color in WPF

I have noticed when setting the selection of a text box in wpf to red, and using a color picker to verify the color, the color faded to #FF9999. I have a specific color my client requires for the selection brush. Is there a way to calculate what…
SetiSeeker
  • 6,482
  • 9
  • 42
  • 64
8
votes
1 answer

Android custom brush pattern/image

I have an 8x8 Image. (bitmap - can be changed) What I want to do is be able to draw a shape, given a Path and Paint object onto my SurfaceView. At the moment all I can do is fill the shape with solid colour. How can I draw it with a pattern. In the…
IAmGroot
  • 13,760
  • 18
  • 84
  • 154
8
votes
2 answers

Convert System.Windows.Media.Brush to System.Drawing.Brush

How can I convert a System.Windows.Media.Brush to System.Drawing.Brush? I'm trying to get the color of a system.windows.media.brush formatted to a System.Drawing.Color object. The below solution doesn't work because it requires a solidcolorbrush…
stormist
  • 5,709
  • 12
  • 46
  • 65
8
votes
3 answers

Making an eraser tool for a paint app in iOS

I am creating a paint app and I want to know how to implement the eraser tool. I don't want to have my eraser tool to paint white color because I want to allow users to change the background color. And also, is it possible to set the hardness of the…
user1343911
7
votes
1 answer

Cannot do a brush interaction and set a state in a useEffect hook with D3 and React

I'm trying to create a brush interaction on a timeline with D3 and React but I can't figure out why it doesn't work. Everything seems fine but when I set a state within the useEffect() the index variable creates an infinite loop. const Timeline…
user990463
  • 439
  • 1
  • 7
  • 27
7
votes
0 answers

iOS, UIGraphics How to change only alpha channel when you drawing round rect to create brush with glow effect

I ma working on app that has brush tool. I need create brush like in Instagram. Currently I am using Shadow to create such glow effect. But I can't set such shadow effect. let startPoint = convertToOutput(firstPoint), endPoint =…
Victor.V
  • 177
  • 1
  • 9
7
votes
1 answer

Disable clearing of D3.js brush

I would like to use a D3.js brush to allow users to select a range of values on an axis. By default, clicking outside the brush clears it, so that no range is selected. However, I would like to adjust this behaviour so that clicking outside the…
Jake
  • 951
  • 8
  • 24
6
votes
4 answers

Combined solidcolor brush

Is there a way to create a kind of "solidcolorbrush" that is a mixture of 2 solidcolor brushes? For the back color, i would like to be able to use a DynamicReference to some other brush. While the other color (in the front) could be a static color…
Nikos Tsokos
  • 3,226
  • 2
  • 34
  • 41
6
votes
1 answer

TextBlock brush giving incorrect color

I have a TextBlock and a Rectangle, both sitting in an empty WPF4 window. The TextBlock's Foreground and the Rectangle's Fill are both set to a SolidColorBrush with value #80800000. This is what it looks like: The Rectangle's color is correct (a…
user773942
  • 193
  • 5
6
votes
2 answers

WPF Gradient in 2 directions

If i want to make the edges of a selected item in a Listbox look smooth I do this:
Maestro
  • 9,046
  • 15
  • 83
  • 116
1
2
3
27 28