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
 How to access the Shape images?

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
PeterPanino Posted - Sep 21 2020 : 17:40:40
How can I access the Shape images?

I would like to present the shapes to the user not only in a ComboBox but as THUMBNAILS in a Thumbnail View, like in Explorer.
12   L A T E S T    R E P L I E S    (Newest First)
PeterPanino Posted - Sep 27 2020 : 17:10:30
I've read the details. Looks very good.
xequte Posted - Sep 27 2020 : 16:11:52
Nicely done, Peter.

9.2.0 is out now too.

Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Sep 25 2020 : 10:08:48
Hi Nigel,

good. Currently, I get the shape by:

procedure TForm1.ImageEnMView1Select(Sender: TObject; idx: Integer);
begin
  ImageEnView1.Layers[FLayerIndex].BorderShape := TIEShape(idx);
end;


But accessing the shape from the shape-image tag is indeed a very good idea because it compensates for possible errors when UniqueOnly = True.

The problem with setting the color of the mentioned shape area has been solved by setting AlphaFill to True and with a smart color-management.
xequte Posted - Sep 23 2020 : 17:32:22
Thanks for your compliments, Peter,

In 9.2.0 (next week), if you have used AddShapesToImageEnMView, you can access the shape of an item by typecastings its tag as TIEShape, e.g.

// Get selected shape
shp := TIEShape( ImageEnMView1.ImageTag[ ImageEnMView1.SelectedImage ]);
ShowMessage( IEShapeToStr( shp ));


Regarding your draw issue, the images you are adding to the TImageEnMView probably do not have alpha. Can you show me your fill code?

Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Sep 23 2020 : 10:48:58
I am always amazed how enormous the possibilities of ImageEn are!
PeterPanino Posted - Sep 23 2020 : 10:21:40
Well, when setting
AlphaFill = True
the area gets filled. It seems to take its color from BackgroundColor in OnGetColors.

The documentation says: "AlphaFill uses an alpha background". Does this mean that the area outside of the shape is made transparent so that the background color shines through?
PeterPanino Posted - Sep 23 2020 : 10:05:43
This is how I fill a TImageEnMView with shapes taking their colors from the current text-layer:



However, I was not able to figure out how to set the color of the area outside of the shape:



Can this color be set?
PeterPanino Posted - Sep 23 2020 : 05:25:14
 
The TImageEnMView makes a nice selector


I am sure there is a method to give back the selected correct internal Shape index number even if parameter UniqueOnly = True?
PeterPanino Posted - Sep 22 2020 : 19:00:59
Thanks for the link!
xequte Posted - Sep 22 2020 : 16:14:59
Hi

The TImageEnMView makes a nice selector:

http://www.imageen.com/help/AddShapesToImageEnMView.html

Nigel
Xequte Software
www.imageen.com
PeterPanino Posted - Sep 22 2020 : 11:03:22
Generally: As combo- or list-boxes have only a 1-dimensional selection functionality, a 2-dimensional selection mode offered by thumbnail-views is a better UI-choice for 2-dimensional items like shapes.
xequte Posted - Sep 21 2020 : 19:41:46
Hi Peter

Please see the examples at IEDrawShape showing how to output all shapes:

http://www.imageen.com/help/IEDrawShape.html

You can also quickly draw shapes to a combo or list box:

http://www.imageen.com/help/IEDrawShapeToComboListBoxItem.html

or TImageEnMView:

http://www.imageen.com/help/AddShapesToImageEnMView.html:

// Save all shapes as gif files
for shp := Low(TIEShape) to High(TIEShape) do
begin
  bmp := TIEBitmap.Create;
  bmp.Allocate( Thumb_Size, Thumb_Size );
  bmp.Fill(clWhite );
  IEDrawShape( bmp.IECanvas, shp, 0, 0, bmp.Width, bmp.Height, iebTrue, clNone, 0, $00FF8000 );
  bmp.write( 'D:\' + IEShapeToStr( shp ) +'.gif');
  bmp.free;
end;


Nigel
Xequte Software
www.imageen.com