Author |
Topic  |
|
klausdoege
  
Germany
389 Posts |
Posted - Sep 27 2012 : 07:53:10
|
Hello, I would like to use the ImageEnVect.Proc.PaintPenMarker in a selection. Here my source code.
if not ImageEnVect.Selected or ImageEnVect.IsPointInsideSelection(bx,by) then begin RGBColor := ImageEnVect.IEBitmap.Pixels[BX, BY]; my_Color := TRGB2TColor ( RGBColor ); quellfarbe:=pen_color; ImageEnVect.Proc.PaintPenMarker( BX, BY, ra_pen, quellfarbe,My_Color, 255 ); end;
But unfortunately it draws over the selection out. See picture.  160.74 KB What do I make wrong?
Klaus www.klausdoege.de |
|
xequte
    
38790 Posts |
Posted - Sep 30 2012 : 00:38:31
|
Hi Klaus
What is the value of ra_pen?
Even though the centre point (BX, BY) is within the selection, the extent of the mark is not.
Unfortunately i can't think of any easy way to avoid that with a freeform selection. Hopefully Fabrizio or Bill have an idea...
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
 |
|
klausdoege
  
Germany
389 Posts |
Posted - Sep 30 2012 : 13:59:46
|
Hello Nigel, the diameter is 20px about, but it happens with each diameter. I believe it is tested the rectangle of the selection. Not the correct selection as circle or polygon.  103.36 KB |
 |
|
klausdoege
  
Germany
389 Posts |
Posted - Oct 08 2012 : 12:48:54
|
Hello, is a correction planned here?
Klaus www.klausdoege.de |
 |
|
xequte
    
38790 Posts |
Posted - Nov 29 2012 : 22:55:19
|
Hi Klaus
What version are you using? I cannot reproduce this in v4.1.4.
I tested using this code:
procedure TMainForm.ImageEnView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
if ImageEnView1.IsPointInsideSelection(X - ImageEnView1.OffsetX, Y - ImageEnView1.OffSetY) then
ImageEnView1.Proc.PaintPenMarker(X - ImageEnView1.OffsetX, Y - ImageEnView1.OffSetY, 5, clRed,clBlue, 255 );
end;
And it worked as expected.
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
 |
|
klausdoege
  
Germany
389 Posts |
Posted - Dec 05 2012 : 11:49:51
|
Hello Nigel, I use also v4.1.4 With this code, the same result comes as previously. The brush draws a rectangular area outside the Selection. Greetings Klaus
Klaus www.klausdoege.de |
 |
|
xequte
    
38790 Posts |
Posted - Dec 06 2012 : 00:54:34
|
Hi Klaus
Please create a very small demo to illustrate the issue and email it to me.
Nigel Xequte Software www.xequte.com nigel@xequte.com
|
 |
|
w2m
   
USA
1990 Posts |
Posted - Dec 07 2012 : 06:49:08
|
I made a simple demo that does not allow you to draw a PaintPenMarker outside of an ellipse selection. If you use the latest version of ImageEn it is simple to do: 1. Create s new VCL Application 2. Drop an ImageEnView on the form, set its align to alClient, set MouseInteract to miSelectCircle, and set SelectionOptions to [iesoAnimated,iesoSizeable,iesoMoveable,iesoCanScroll,iesoDisableOneClickDeselect] 3. In the OnMouseMove Event add
procedure TForm1.ImageEnView1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
begin
if ImageEnView1.IsPointInsideSelection(X - ImageEnView1.OffsetX, Y - ImageEnView1.OffSetY) then
ImageEnView1.Proc.PaintPenMarker(X - ImageEnView1.OffsetX, Y - ImageEnView1.OffSetY, 5, clRed,clBlue, 255 );
end;
To Test, compile the project and select an ellipse. Then move the mouse...
The result is painting only takes place inside the selection.
William Miller Email: w2m@frontiernet.net EBook: http://www.imageen.com/ebook/ Apprehend: http://www.frontiernet.net/~w2m/index.html |
 |
|
klausdoege
  
Germany
389 Posts |
Posted - Dec 07 2012 : 08:55:37
|
Hello Nigel, yes that works out. My Procedure is very extensive, obviously I have another problem there. I must test it again. Thanks for your patience. Greetings Klaus
Klaus www.klausdoege.de |
 |
|
|
Topic  |
|