Author |
Message |
XxMaverickxX
|
Posted: Wed Jan 12, 2011 9:04 am Post subject: Clearing text only... or any other object Need Help Fast |
|
|
What is it you are trying to achieve?
I'm trying to Erase Text, Images individually
What is the problem you are having?
When use I Text.Cls to erase text, it erases the objects drawn on the screen too...
Describe what you have tried to solve this problem
I Tried going on the forums for tutorials but no luck finding any
Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
I don't have an example code I can give out at the moment.
Turing: |
<Add your code here>
|
Please specify what version of Turing you are using
<Answer Here> |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tony
|
Posted: Wed Jan 12, 2011 10:06 am Post subject: RE:Clearing text only... or any other object Need Help Fast |
|
|
You could draw a white (or whatever the background colour is) box over the parts that you are erasing; or clear everything, and then redraw all but the part you you want to erase. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
XxMaverickxX
|
Posted: Wed Jan 12, 2011 10:56 am Post subject: Re: Clearing text only... or any other object Need Help Fast |
|
|
I'l try to the redraw, but I prefer to have it simply erase it individually, Turing doesn't support it? |
|
|
|
|
|
2goto1
|
Posted: Wed Jan 12, 2011 11:09 am Post subject: RE:Clearing text only... or any other object Need Help Fast |
|
|
When it comes to turing, I don't think that there is a concept of "layers", like what you might find in a program such as Photoshop or Paintshop Pro. Every time you draw something onscreen via the Turing APIs, it is rasterized and combined into one screen object.
Contrast that to a program such as Photoshop or Paintshop Pro. When you hide or delete a layer, or remove a text object or some other object, the contents below that layer are shown to you.
Some programming languages and presentation frameworks support that type of concept, but I don't think that Turing does. You have to program your own layering. |
|
|
|
|
|
XxMaverickxX
|
Posted: Wed Jan 12, 2011 11:35 am Post subject: Re: Clearing text only... or any other object Need Help Fast |
|
|
Got any ideas how i could start to program a layer? if no it's alright thanks for the answers |
|
|
|
|
|
2goto1
|
Posted: Wed Jan 12, 2011 11:42 am Post subject: RE:Clearing text only... or any other object Need Help Fast |
|
|
It would be a pretty complex thing to do multiple layers, I wouldn't bother if you're just getting started.
Doing the clearing thing that Tony said is the easiest way to get started. Even that can be a task...imagine if you have overlapping objects that have been drawn onscreen. To redraw them properly you would have to track the z-index of each of those objects, in order to redraw the overlapping properly. If you don't have any overlapping objects then it's a little easier to program. |
|
|
|
|
|
Tony
|
Posted: Wed Jan 12, 2011 12:43 pm Post subject: RE:Clearing text only... or any other object Need Help Fast |
|
|
Presumably one knows the z-indexes (perhaps implicitly) by having drawn all that stuff in the first place. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
XxMaverickxX
|
Posted: Wed Jan 12, 2011 1:04 pm Post subject: Re: Clearing text only... or any other object Need Help Fast |
|
|
Thank you for the help guys. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
|