Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Why without drawing?  RSS feed

 
Hui Zhao
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I print out all the data, they do exist.but why no painting?
Thanks
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The code is not doing anything with the GeneralPath. I think it's missing a "g2d.draw(p)" or something like that.
 
Hui Zhao
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes,now it works on drawing. But the color is wrong.
 
Hui Zhao
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know the problem.
During the for loop each i iterative has a color, but in my code. g2d is paint and overrided with the last iterative i= numberofCells. How to reslove the issue?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!