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 dynamically generate elliptical seats?

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

Format  BoldItalicizedUnderline Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailBrowse for an image to attach to your post Browse for a zip to attach to your post Insert CodeInsert QuoteInsert List


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
hifly Posted - Jun 30 2019 : 11:03:49
How to dynamically generate elliptical seats and sign names by row and column?Is there a code reference for related examples?

6   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jul 07 2019 : 00:57:47
The width and height of the circle will be ImageEnView1.Layers[i].Width/Height.

So to find a point on the edge of the circle at 30 deg. would be something like:

lyr := ImageEnView1.Layers[i];
centerPt.X := lyr.PosX + lyr.Width div 2;
centerPt.Y := lyr.PosY + lyr.Height div 2;
ptOnEdge := OffsetPoint( centerPt, lyr.Width div 2, lyr.Height div 2, 30 );

Xequte Software
hifly Posted - Jul 05 2019 : 22:46:30
How to mark the angle of 0, 30, 60, 90, 120, 150, 180, 210 degrees and coordinates of the circle?
hifly Posted - Jul 01 2019 : 20:58:33
I don't have any code here. How to generate 10 name tags out of a circle with both X and Y axes accurate is a difficult problem for me.
xequte Posted - Jul 01 2019 : 17:23:19

Please show me the code that you have so far to dynamically create the labels.

Xequte Software
hifly Posted - Jul 01 2019 : 04:19:01
Outside Drawing Text Data Fixed must have 10 names, so you see how to solve it? Provide the following example code, thank you.
xequte Posted - Jun 30 2019 : 23:43:41
The following code will create a 2x3 set of numbered ellipses:

  for I := 1 to 6 do
    // Add a text object
    ImageEnView1.LayersAdd( 'A' + IntToStr( I ), 14, clBlack, 'Arial', [fsBold]);
    txtLayer := TIETextLayer( ImageEnView1.CurrentLayer );

    if I mod 2 = 0 then
      txtLayer.PosX := 500  // even number
      txtLayer.PosX := 100;  // Odd number;
    txtLayer.PosY := ( I + 1 ) div 2 * 300 + 100;
    txtLayer.Width  := 200;
    txtLayer.Height := 200;
    txtLayer.BorderColor := clRed;
    txtLayer.BorderWidth := 5;
    txtLayer.FillColor   := clYellow;
    txtLayer.BorderShape := iesEllipse;
    txtLayer.Alignment   := iejCenter;
    txtLayer.Layout      := ielCenter;

However drawing the text outside the circle (Name* labels in your image) is much harder. You would need to create individual text layers and position them independently.

As a starting point to calculate the PosX and PosY for each label, use the OffsetPoint method in hyieutils.

Xequte Software