ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 Pen size

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
pierrotsc Posted - Jul 11 2015 : 08:32:13
I am trying to be able to change the pen size of the small circle handles when i have a selection. (Could be box or circle).

I use the Imageenvect.ObjGripPen.Width := StrToInt(sSpinEdit_GripPenSize.Text);
Imageenvect.update;

That does not work.

What am i doing wrong?

Thanks.
Pierre
13   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 13 2015 : 19:36:30
Hi Pierre

Yes, I'm afraid the pen of the selction grip cannot be set.

Nigel
Xequte Software
www.xequte.com
nigel@xequte.com
pierrotsc Posted - Jul 12 2015 : 11:54:29
The thickness of the circle's pen. The more i think about it, it really does not matter as long i can change the size of the circle.
Never mind..
I really wasted a whole thread :(

Really appreciate your patience.
Pierre
w2m Posted - Jul 12 2015 : 10:52:53
Unfortunately I still do not understand. What do you mean by "thickness"?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
pierrotsc Posted - Jul 12 2015 : 10:50:29
Well, that does not change the pen size :) I am aware of that. it makes the circle or the box bigger but does not change its thickness.
Sorry if i did not make my question clearer..
So, can that be done?
Apologize for all the confusion.
Pierre
w2m Posted - Jul 12 2015 : 10:36:38
Oh Dear, you were not even talking about objects at all. You were referring to selection grips. Pierre, you should try to describe what you are trying to do better so you get the correct help.
ImageEnVect1.SetSelectionGripStyle(clWhite, clRed, bsSolid, strtointdef(Edit2.Text, 5), True, iegsCircle);

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
w2m Posted - Jul 12 2015 : 10:24:20
You only have 2 choices. Set the grip pen width or the objects pen width and I have shown you how to do both. There are no other choices.

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
pierrotsc Posted - Jul 12 2015 : 10:21:00
Bill, i do not think this is what i am trying to do. It is more inline with the setgripstyle command.
I have attached the vectorial demo modified. You will have to run it as all the uneeded components are not visible when you do so. Only 2 are going to be left on the form. You'll know waht i am trying to accomplish the,
Thanks for the help.
Pierre

attach/pierrotsc/2015712101843_Vectorial.zip
16.42 KB
w2m Posted - Jul 12 2015 : 08:56:59
procedure TForm1.BrushSize1Change(Sender: TObject);
var
  i: Integer;
  iHObj: Integer;
begin
  if StrToInt(BrushSize1.Text) > 1 then
    ImageEnVect1.HighlightedPixel := Point(-1, -1);
  PenSizeScrollBar1.Position := StrToInt(BrushSize1.Text);
  if (StrToInt(BrushSize1.Text) = 1) and ((Draw1.Down) or (Erase1.Down)) then
    ImageEnVect1.Cursor := crIEPencil
  else if (Draw1.Down) or (Erase1.Down) then
    ImageEnVect1.Cursor := crIEBrush;
  iHObj := -1;
  if ImageEnVect1.ObjectsCount > 0 then
    with ImageEnVect1 do
      for i := -1 to SelObjectsCount - 1 do
      begin
        if i >= 0 then
          iHObj := SelObjects[i];
        if iHObj <> -1 then
          ObjPenWidth[iHObj] := StrToIntDef(BrushSize1.Text, 5);
      end;
  ImageEnVect1.Update;
end;

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
pierrotsc Posted - Jul 11 2015 : 20:39:52
Ok maybe what i want to do is different. i am calling
MouseInteract := MouseInteract + [miSelectPolygon];

so i have a rectangle selection with yellow circle and marching ants.
with that, i can copy or cut part of the image.

This is the width and size of the yellow circle i am trying to change.
I modified the vectorial demo with the code you gave me and that does not change.

Advice?
Thanks.
pierrotsc Posted - Jul 11 2015 : 15:43:29
That is what I thought. I know it used to work but not in my current code. Need to find out what is creating the problem then.
Thanks for checking.
Pierre
w2m Posted - Jul 11 2015 : 14:40:30
this works:
ImageEnVect1.ObjGripPen.Width := StrToIntDef(PenWidth1.Text, 5);

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development
pierrotsc Posted - Jul 11 2015 : 14:35:37
Bill, i am trying to set the grips pen width.
Thanks.
Pierre
w2m Posted - Jul 11 2015 : 12:51:59
ImageEnVect1.ObjGripPen.Width := StrToIntDef(PenWidth1.Text, 5);
ImageEnVect1.Update;

works for me... this is different than
if iHObj <> -1 then
ObjPenWidth[iHObj] := StrToIntDef(BrushSize1.Text, 5);

Are you calling Update after you set the GripPenWidth?

Are you trying to set an objects pen width or the grips pen width?

Bill Miller
Adirondack Software & Graphics
Email: w2m@hughes.net
EBook: http://www.imageen.com/ebook/
Custom Commercial ImageEn Development