Jump to content
Software FX Community

Trying to reimplement zoom with SetScrollView()


User (Legacy)
 Share

Recommended Posts

Hi,

I'm trying to reimplement the zoom method in manner to obtain an X-axis zoom

mode only.

By doing that I am using this approach:

- I import my chart data model (.CHD)

- I enter in zoom mode clicking on the zoom button

- after having drawn the zoom rect and so after having catched the

"PostPaint" signal, I simply call SetScrollView() method on Y-axis to set

the original stored axis limits. The behaviour expected is what I want. So

the chart graphical representation has only a horizontal scrollbar.

- but when I exit from the zoom mode, by toggling off the zoom button, I

obtain a chart that is completely different and deformed from the original

one. The horizontal scrollbar persist and the Y-axis label translate to the

rigth of the chart.

Is there a different approach to realize an hypotetical X-axis zoom mode?

Thanks in advance

Luca

Link to comment
Share on other sites

Unlike Zoom, SetScrollView() is a PERMANENT change, it will NOT be undone

when zoom is turned off.

I think what you want to do is Zoom instead of SetScrollView. The Zoom

method works similar to SetScrollView but it stores the current values so

than when ZoomOff is called they can be restored.

--

FP

Software FX

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...