The Artima Developer Community
Sponsored Link

Java Answers Forum
for the experts a ques 4m a novicee

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
gaurav

Posts: 12
Nickname: goravtomar
Registered: Jul, 2004

for the experts a ques 4m a novicee Posted: Sep 24, 2004 7:18 AM
Reply to this message Reply
Advertisement
i want to draw using the mouse darw event. My problem is that i have to restrict the drawing in aspecified area. i ahe a panel and i want to restrict drawing only in a irregular area on the panel. let's say there is a triangle on that panel and the user cannot draw with in that triangle. the problem is that when i darg the mouse too fast very less mouse darg events are generated. let me explain it by the folloeing fig.
###############################
# #
# # x #
# # # x #
# # # x #
# # # x #
# # # #
# ############ #
# x #
# #
# #
###############################

X points are the points where the event mousedrag get fired. iam darwing the lines on the basis of
drawLine(prvsX,prvsY,newX,newY);
when the lowest event gets fired the prvsX and prvsY are the second lowest points and it darws line from prvs point to new point and the line crosses the non-drawable region.
from where can i get more knowledge of event handling or a way to increase the amount of events fired.

Topic: SWT Graph - Chart Previous Topic   Next Topic Topic: Sorting an ArrayList using

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use