Imageview size

Stulish

Active Member
Licensed User
Longtime User
Can anyone tell me what the maximim image view size is.

What i am trying to do is create what is called a Compass Tape Repeater, the attached image shows you a section of the repeater that is seen in the window (Imageview), and as the vehicle turns the Tape repeater moves left or right depending on the direction of turn, the center of the repeater shows current heading.

I thought if i made a graphical representation of the repeater tape, from 170 through 000 to 190 degrees (380 degrees of tape to allow for overlap) as a PNG file and then loaded the file into an imageview i could just move the left position of the image view depending on the current heading (i have done this in VB before and it looks nice and neat and with smooth scrolling).

The problem i have is the PNG file is 80 pixels high and 8400 pixels width, when i load it into the imageview nothing is displayed. If i load the small view of only 30 degrees with a width of 1406 pixels and 80 pixels height (see uploaded picture (i had to reduce size to under 1024 width to upload, the zip contains the large size PNG file 8400x80 pixels, so you can see what i mean) it shows in the imageview fine.

Does the image view have a maximim width or height, or is there a better way of animating this tape repeat ( a web page with a tape repeater on is Course Recorder so you can see what it looks like in the real world)

:sign0163::sign0085: im :BangHead:
 

Attachments

  • gyrotape_small upload.png
    gyrotape_small upload.png
    15.7 KB · Views: 176
  • gyrotape.zip
    11.2 KB · Views: 147
Last edited:

klaus

Expert
Licensed User
Longtime User
I don't know if there is a limit what its value could be.

I'd suggest you to load the image into a Bitmap draw the relevant part of this Bitmap onto the ImageView.

Attached a small project showing the principle.
Up to you to adapt the different parameters and the scale value.

Best regards.
 

Attachments

  • gyrotape.zip
    18.4 KB · Views: 183
Last edited:
Upvote 0

Stulish

Active Member
Licensed User
Longtime User
Thanks Klaus,

I looked at your example and played with it and it now works a dream :) with resolution down to 0.1 of a degree.

:)

:wav:
 
Upvote 0
Top