brush

iOS - Brush that doesn't overlay itself

拜拜、爱过 提交于 2019-12-23 22:29:23
问题 When you draw by a brush in Photoshop it doesn't overlap itself until you release mouse button and press it again. I found these images, that let me explain myself better. Now my drawing works the right way, but i want them to work like the left one. If it's even possible I wish It wouldn't overlay itself even after user releases finger and start drawing again, but I'll go with basic photoshop-like brush. I guess creating brush that never overlap itself is simmilar with creating an eraser, in

Android custom brush pattern/image

早过忘川 提交于 2019-12-21 02:25:10
问题 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 image you can see the brush pattern (The cross). It can be anything from a cross to a donut or an elf. How would I go about drawing this pattern background. I also eventually want to apply colours to it. So far, my theory is to create a clip area

solid brush property not binding

亡梦爱人 提交于 2019-12-20 06:58:40
问题 I have a class X there are some data: private string yyy; public string YYY { get { return yyy; } set { yyy= value; NotifyPropertyChanged("YYY"); } } private SolidBrush color; public SolidBrush Color { get { return color; } set { color= value; NotifyPropertyChanged("Color"); } } My Data Grid bind to this class like this: <DataGrid x:Name="dg1" ItemsSource="{Binding}" AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridTemplateColumn Header="yyy" > <DataGridTemplateColumn.CellTemplate>

solid brush property not binding

巧了我就是萌 提交于 2019-12-20 06:58:25
问题 I have a class X there are some data: private string yyy; public string YYY { get { return yyy; } set { yyy= value; NotifyPropertyChanged("YYY"); } } private SolidBrush color; public SolidBrush Color { get { return color; } set { color= value; NotifyPropertyChanged("Color"); } } My Data Grid bind to this class like this: <DataGrid x:Name="dg1" ItemsSource="{Binding}" AutoGenerateColumns="False"> <DataGrid.Columns> <DataGridTemplateColumn Header="yyy" > <DataGridTemplateColumn.CellTemplate>

How to brush the plot and then save the brushed data in GUI?

随声附和 提交于 2019-12-20 02:59:08
问题 I have read couple of posts on how to save brushed data, however, on trying the suggestions on these posts (this, this, this, this and this), none of them seem to be working. One of the problem I encountered while trying these suggestions is that the program runs all the way through the end before any data is brushed, and therefore, the saved data is an empty matrix. My objectives are: Brush the data, and Save the brushed data. This is what I tried from here but it didn't seem to work: t=0:0

Use HSV instead of RGB in WPF

旧街凉风 提交于 2019-12-13 15:46:18
问题 I'm using the Color.FromArgb to for determining the brush color. Using this for example Pen p= new Pen(new SolidColorBrush(Color.FromArgb(95, 255, 0, 0)), 6); the problem with this is that I want to use 4 colors of the brushes (red, orange, yellow and green). And I have a condition where depending on the value in this condition the color is chosen with a certain transparency. The problem with this is the transition between the two different colors, for example from green to yellow or from

Diagonal brush style gives me black area

岁酱吖の 提交于 2019-12-12 17:17:09
问题 I want to draw a diagonal cross into a Canvas with this code: InFlateRect(r, -1, -1); Canvas.Brush.Color := clYellow; Canvas.Brush.Style := bsFDiagonal; Canvas.Pen.Color := clRed; //Pen.Style := psClear; Canvas.Rectangle(r); But the result is a black box. If I remove the style changing, a normal solid yellow area I got. Why is the rectangle black with this code? Thanks for every suggestion Sorry for missing info, I extend it: This procedure is using TMetaFileCanvas to draw. On normal Form I

How to append two brush classes [closed]

落爺英雄遲暮 提交于 2019-12-12 09:26:58
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . Is there any way or workaround to combine/append two System.Drawing.Brush classes together? e.g. Brush b1 = GetFromSomewhere(); Brush b2 = GetFromSomewhereElse(); (something like that...) Brush b3 = b1 + b2; Eventually my purpose is to do something like: Graphics graphics = new Graphics; graphics

Can a Pen or Brush paint a Point?

安稳与你 提交于 2019-12-12 04:09:51
问题 I know that I can draw a filled circle and I can draw many simple and complicated things with a Graphics. But I couldn't get it to draw a single point (not a single pixel). I'm playing with a Paint program and the user can draw fine but not plot a dot. I can add a dummy point really close or can draw a filled cirlce but sometimes I miss the obvious. So is there a way to draw a single point with a given Brush or Pen ? And no, of course I don't mean to draw a single Pixel. I want to use the

Delphi: Canvas.FillRect in List View

我们两清 提交于 2019-12-11 19:36:55
问题 On change of a text of List View's SubItem I need to brush and fill a whole row: procedure TForm1.ListViewDrawItem(Sender: TCustomListView; Item: TListItem; Rect: TRect; State: TOwnerDrawState); begin if Item.SubItems[2]='Done' then begin Sender.Canvas.Font.Color := clBlack; Sender.Canvas.Brush.Color := clGreen; Sender.Canvas.Brush.Style := bsSolid; Sender.Canvas.FillRect(Rect); end; end; But Sender.Canvas. FillRect(Rect) will fill only a Rect of the SubItem. How to fill a whole row? The