Page 1 of 1

ImagePoint

Posted: Wed May 23, 2007 2:03 pm
by 9530819
I want to draw a custom image at each point of my series. When I do this using the Point series and the .Brush.AssignImage method it seems as though it tiles the image behind the chart and each point is actually a 'cut-out' displaying a portion of the tiled image, meaning my image looks wrong.

For reference I am trying to plot an image of a page at each point to represent a user-defined note at that date. User could then click on point to edit note.

Hope this makes sense.

Posted: Thu May 24, 2007 8:28 am
by narcis
Hi Rossmc,

Well, there are no TeeChart methods and properties you can use to manipulate the Image once it has been assigned to IBrush. All manipulation of the image has to occur before the image is assigned, e.g. (solid2.jpg is an image 10 x 20 pixels):

Code: Select all

 Private Sub Form_Load()
 With TChart1
     .Aspect.View3D = False
     .AddSeries scPoint
     .Series(0).FillSampleValues 10
     ImageList1.ListImages.Add , , LoadPicture("C:\Documents and Settings\Administrator\My Documents\My Pictures\solid2.jpg")
     .Series(0).asPoint.Pointer.Brush.AssignImage ImageList1.ListImages.Item(1).Picture
     .Series(0).asPoint.Pointer.VerticalSize = ImageList1.ImageHeight * (Screen.TwipsPerPixelY / 30)
     .Series(0).asPoint.Pointer.HorizontalSize = ImageList1.ImageWidth * (Screen.TwipsPerPixelX / 30)
 End With
 End Sub