thank you bob

that's helping me a lot :)

let's code \m/

big up


2013/4/17 bob <b...@coolfone.comze.com>

> If you don't use *save*() and *restore*() and something gets drawn after
> your needle, it will also be rotated just as the needle was rotated.
>
>
> So you would probably use something like this:
>
>
> *canvas.save();*
>
>
> canvas.rotate(45, 100, 100);
>
> canvas.drawBitmap(…);
>
>
> *canvas.restore();*
>
>
> Thanks.
>
>
>
>
> On Wednesday, April 17, 2013 12:08:12 PM UTC-5, psyco wrote:
>
>> thank you BOB that helps me a lot :)
>> i used draw method to draw the needle (initial position) then i used
>> rotate like you said to rotate it
>> and it works correctly
>> did i need to use save and restore methods?
>>
>>
>> 2013/4/17 bob <b...@coolfone.comze.com>
>>
>>> Break the needle off of that image and put it in it's own image.
>>>
>>> Then use this function in *Canvas*:
>>>
>>> final void *rotate*(float degrees, float px, float py)
>>>
>>> Also, you will call *drawBitmap* in the Canvas class.
>>>
>>> Of course, you will want to *save()* and *restore()* the matrices
>>> before and after the rotation.
>>>
>>> Thanks.
>>>
>>>
>>> On Wednesday, April 17, 2013 5:04:37 AM UTC-5, psyco wrote:
>>>>
>>>> hi all,
>>>>
>>>>
>>>>
>>>> <https://lh4.googleusercontent.com/-4D0DiiIo5fQ/UW5zlODBo5I/AAAAAAAAADU/wXMM1ppiHz4/s1600/thermometer_icon.png>am
>>>> trying to build a custom view witch displays a gauge, what i did is :
>>>> 1-designed the gauge with photoshop
>>>> 2-created the cutom View and it's .XML file
>>>> 3-set the bakcground gauge
>>>> So, i need to know how to display a needle and how rotating it
>>>> some help will be very grateful
>>>>
>>>>  --
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Android Developers" group.
>>> To post to this group, send email to android-d...@**googlegroups.com
>>>
>>> To unsubscribe from this group, send email to
>>> android-developers+**unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/**group/android-developers?hl=en<http://groups.google.com/group/android-developers?hl=en>
>>> ---
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "Android Developers" group.
>>> To unsubscribe from this topic, visit https://groups.google.com/d/**
>>> topic/android-developers/**CTlRkqPuBVI/unsubscribe?hl=en<https://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en>
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> android-developers+**unsubscr...@googlegroups.com.
>>> For more options, visit 
>>> https://groups.google.com/**groups/opt_out<https://groups.google.com/groups/opt_out>
>>> .
>>>
>>>
>>>
>>
>>
>>
>> --
>> Abdallah Mohamed Amine
>> Élève ingénieur en informatique de la FST
>> Responsable d'un club embarqué microdesign
>> Tél : +216 27 105 393
>>  <http://microdesignclub.com>
>>
>  --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "Android Developers" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/android-developers/CTlRkqPuBVI/unsubscribe?hl=en
> .
> To unsubscribe from this group and all its topics, send an email to
> android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>



-- 
Abdallah Mohamed Amine
Élève ingénieur en informatique de la FST
Responsable d'un club embarqué microdesign
Tél : +216 27 105 393
<http://microdesignclub.com>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to