Thread Rating:
  • 318 Vote(s) - 2.75 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to know if Graphic object is being displayed?
10-27-2011, 04:30 PM,
#4
RE: How to know if Graphic object is being displayed?
In that case, you should also look at the display-context option. As the documentation notes, when a Visual's display-context is non-null, it's attached to a graphical hierarchy or otherwise able to be displayed; if it's null, then you know it's definitely not being displayed. Able to be displayed doesn't necessary mean being displayed, so you would also want to check the View.visibility as mentioned above if the option is non-null if you're interested in seeing if it's really on-screen.

So, roughly:
  1. Is display-context null? If so, stop: we're not displayed.
  2. Else is get-view null? If so, again, stop: we're either being printed or not in an actual View.
  3. Else is View.visibility hidden or minimized? If so, stop: the View is out of the user's visibility.
Note that it's OK to check these values -- except note that if you're calling get-view that requires layout validation so be careful about when your timing -- but be cautious about moving Visuals around or setting key options in response to changes, or you may end up with invalidation loops or similar trouble.
Reply


Messages In This Thread
RE: How to know if Graphic object is being displayed? - by c-s - 10-27-2011, 04:30 PM

Possibly Related Threads...
Thread Author Replies Views Last Post
  TLS通信下でCould not deserialize the object from Curl.発生 MIT 3 4,767 03-10-2017, 08:35 AM
Last Post: MIT
  Could not deserialize the object from Curl. umemura 4 6,641 04-11-2015, 04:45 AM
Last Post: Sumerjobs
  print-graphic-pdfに関して nmyzk 1 3,446 05-11-2012, 05:23 PM
Last Post: nmyzk
Tongue print-graphic-pdfプロシージャの仕様について 森口 慶紀 1 3,625 09-30-2011, 06:36 PM
Last Post: 森口 慶紀
Forum Jump:


Users browsing this thread:
1 Guest(s)

MyBB SQL Error

MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1017 - Can't find file: 'mybb_threadviews' (errno: 2)
Query:
INSERT INTO mybb_threadviews (tid) VALUES('323')