Questions tagged [brush]
406 questions
6
votes
3 answers
Brush only parts of an Ellipse in WPF
I'm having trouble to find the best way to draw the below shape. I'm using the below code to draw an Ellipse on visual layer.
But how can I only brush the quarters? I think it can be done using LinearGradientBrush or RadialGradientBrush but I don't…

Vahid
- 5,144
- 13
- 70
- 146
6
votes
1 answer
Zooming and brushing in d3 force directed graph
I'm having a problem in getting D3 to perform proper brushing when zooming is performed.
I have a jsFiddle created here http://jsfiddle.net/Gwp25/2/ showing the network with some dummy data I found elsewhere. The operation to follow is this. Zoom…

Eamonn
- 597
- 7
- 23
6
votes
0 answers
D3.js sophisticated world map brush/thumbnail
I've been looking at the simple map demos.
http://bl.ocks.org/mbostock/2206340
Keen to create a more sophisticated zoom/brush method using a mini map or a brush as opposed to rely on zoom events.
http://bl.ocks.org/mbostock/4343214
How would I…

The Old County
- 89
- 13
- 59
- 129
6
votes
4 answers
d3.js: limit size of brush
Is there a way to limit the size of a brush, even though the extent is larger?
I put together a brush with only an x-scale that can be moved and resized. I would like to be able to limit the extent to which it can be resized by the user (basically…

raffazizzi
- 685
- 6
- 13
6
votes
4 answers
iOS Brush Hardness like Photoshop
How to get the following brush smoothness(hardness) effect like photoshop?
My attempt:
CGContextRef context = UIGraphicsGetCurrentContext();
CGContextSaveGState(context);
CGContextSetLineCap(context,…

Jun
- 3,422
- 3
- 28
- 58
6
votes
4 answers
What is the best way to pick a random brush from the Brushes collection in C#?
What is the best way to pick a random brush from the System.Drawing.Brushes collection in C#?

SBurris
- 7,378
- 5
- 28
- 36
5
votes
1 answer
Is there a replacement for MATLAB's errorbar plot which allows brushing of data?
As noted in the documentation, MATLAB's brush does not work with errorbar plots (see section Plot Types You Cannot Brush). For example,
figure;
errorbar((1:10)+2*sin(.3:.3:3),cos(1:1:10)/2);
hold all;
plot(10:-1:1,'o-g');
brush
generates a plot…

Jonas Heidelberg
- 4,984
- 1
- 27
- 41
5
votes
3 answers
Why does brush have only 3 hexa value?
For example, in this page there is code such as:
Why does the color property only have 3 hex value? Doesn't color normally have 6 or 8 hex value? (like Fill="#FF0000FF") What does the 3…

Louis Rhys
- 34,517
- 56
- 153
- 221
5
votes
2 answers
2013, Existing package for drawing (painting, brush, lines) in iOS?
I need to add typical finger drawing to an app.
(The usual.... choose colors, erase, thickness - just the usual you see in every app made.)
It's hard to believe I have to program this from scratch, in this day and age?
It's hard to believe there is…

Fattie
- 27,874
- 70
- 431
- 719
5
votes
4 answers
d3.js using brush.clear() doesn't work for me
In an object I store line chart made with d3.js, which have possibility to brush selected area.
Selected area is removed when I click outside selected part of line chart.
I'd like to remove selected area clicking on external link eg.…

sanneo
- 365
- 4
- 15
5
votes
4 answers
Programmatically get a brush from the Brushes class?
I have a property that allows the string name of a known colour to be sent to my control. The property only accepts proper known colour names, like "Red" or "Blue"
private KnownColor _UseColor = KnownColor.Red;
///
/// Gets or…

jcharlesworthuk
- 1,079
- 8
- 16
4
votes
1 answer
How to serialize a Windows.Media.Brush
The Windows.Media.Brush is not a serializable class so I am wondering how to go about serializing it.
I am putting the [Serializable] attribute on the class itself and [DataContract] as well along with [DataMember(Name = "PropertyName")] on each…

AzzamAziz
- 2,144
- 1
- 24
- 34
4
votes
4 answers
compare a brush and color
if (backBrush == SystemColors.ActiveCaption)
This fails. Says you can't compare a brush and a color.
How do I find the color of the brush?

Vaccano
- 78,325
- 149
- 468
- 850
4
votes
1 answer
WPF Rendered Color inconsistency with Opacity on Brush and Control Elements
Considering the following xaml.

Jordan
- 41
- 2
4
votes
2 answers
Printing static content from a WebView in a Windows Store App
UPDATE 3
There's a bounty on this question now. The sample project and problem brief are at the bottom of the page under TL;DR; so save yourself some reading and skip to the end!
...
I've been trying to get this highly detailed, upvoted answer from…

roryok
- 9,325
- 17
- 71
- 138