[android-developers] Please help in explaining this geometrical concept!!

2012-09-13 Thread Kunal shah
I know this a stupid question to ask, but I was going through a tutorial
and I just dont seem to understand the below lines of code...Have pulled my
hair understanding the geometrical algorithm behind this, but.Oh!!!
This is very simple but I just dont seem to get it. Please helpI am a
beginner...




  private void drawPict(Canvas canvas, int x, int y, int w, int h,
  float sx, float sy) {
canvas.save();
canvas.translate(x, y);
canvas.clipRect(0, 0, w, h);
canvas.scale(0.5f, 0.5f);
canvas.scale(sx, sy, w, h);
canvas.drawPicture(mPicture);
canvas.restore();
}
@SuppressWarnings(unused)
@Override
protected void dispatchDraw(Canvas canvas) {
super.dispatchDraw(mPicture.beginRecording(getWidth(),
getHeight()));
mPicture.endRecording();
int x = getWidth()/2;
int y = getHeight()/2;
if (false) {
canvas.drawPicture(mPicture);
} else {
drawPict(canvas, 0, 0, x, y,  1,  1);
drawPict(canvas, x, 0, x, y, -1,  1);
drawPict(canvas, 0, y, x, y,  1, -1);
drawPict(canvas, x, y, x, y, -1, -1);
}
}

  I have looked into this again...and understand that canvas.scale has 4
parameters, being the co-ordinates of the points I assume...but I cannot
still understand the float sx, float sy...

sx=-1 and sy=1...it will scale, agreed...but is not there a better way?

-- 
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

[android-developers] Explain the goemetrial concept behind this, please!!

2012-09-13 Thread Kunal Shah
I know this a stupid question to ask, but I was going through a tutorial 
and I just dont seem to understand the below lines of code...Have pulled my 
hair understanding the geometrical algorithm behind this, but.Oh!!! 
This is very simple but I just dont seem to get it. Please helpI am a 
beginner... 



  private void drawPict(Canvas canvas, int x, int y, int w, int h,
  float sx, float sy) {
canvas.save();
canvas.translate(x, y);
canvas.clipRect(0, 0, w, h);
canvas.scale(0.5f, 0.5f);
canvas.scale(sx, sy, w, h);
canvas.drawPicture(mPicture);
canvas.restore();
}
@SuppressWarnings(unused)
@Override
protected void dispatchDraw(Canvas canvas) {
super.dispatchDraw(mPicture.beginRecording(getWidth(), 
getHeight()));
mPicture.endRecording();
int x = getWidth()/2;
int y = getHeight()/2;
if (false) {
canvas.drawPicture(mPicture);
} else {
drawPict(canvas, 0, 0, x, y,  1,  1);
drawPict(canvas, x, 0, x, y, -1,  1);
drawPict(canvas, 0, y, x, y,  1, -1);
drawPict(canvas, x, y, x, y, -1, -1);
}
}

  I have looked into this again...and understand that canvas.scale has 4 
parameters, being the co-ordinates of the points I assume...but I cannot 
still understand the float sx, float sy...

sx=-1 and sy=1...it will scale, agreed...but is not there a better way?

-- 
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

[android-developers] Re: Posts not showing up?

2012-09-13 Thread Kunal Shah
Same thing with me...

On Thursday, September 13, 2012 2:56:47 PM UTC+5:30, Martijn van Mechelen 
wrote:

 Hi,

 Two days ago I've posted three messages into the Android Developers group. 
 The messages probably have to moderated, but they are still not showing up. 
 Is something going wrong?

 Regards,

 Martijn van Mechelen


-- 
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

Re: [android-developers] Explain the goemetrial concept behind this, please!!

2012-09-13 Thread Kunal Shah


On Thursday, September 13, 2012 3:31:07 PM UTC+5:30, Fred Niggle wrote:

 Your post if very vague, at a guess i think your trying to ask someone to 
 explain the concepts of matrix's and image manipulation, and that is true 
 that this mailing list is not the place for such a question.

 Regards,
 Fred

 On 13 September 2012 10:54, Andrea Pietroni andrea@gmail.comjavascript:
  wrote:

 Negative scale numbers mirror the image. It looks like it's drawing the 
 picture half scaled 4 times:
 - first time at top left
 - then at its right, mirroring accordingly
 - etc

 --
 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.comjavascript:
 To unsubscribe from this group, send email to
 android-developers+unsubscr...@googlegroups.com javascript:
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 -- 
 Ubuntu Speech 
 inputhttps://play.google.com/store/apps/details?id=com.nds.ubuntuspeechinputis
  now available on Google Play, along with Magnetic 
 Door Alarm 
 apphttps://play.google.com/store/apps/details?id=com.nds.magneticdooralarm
 .

  

-- 
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

[android-developers] Re: Explain the goemetrial concept behind this, please!!

2012-09-13 Thread Kunal Shah

Thank you
On Thursday, September 13, 2012 3:24:49 PM UTC+5:30, Andrea Pietroni wrote:

 Negative scale numbers mirror the image. It looks like it's drawing the 
 picture half scaled 4 times:
 - first time at top left
 - then at its right, mirroring accordingly
 - etc

-- 
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

[android-developers] Re: Explain the goemetrial concept behind this, please!!

2012-09-13 Thread Kunal Shah
Fred, I understand...But had to learn it somehow
though..And SORRY

 On 13 September 2012 10:54, Andrea Pietroni andrea.pietr...@gmail.comwrote:

  Negative scale numbers mirror the image. It looks like it's drawing the
  picture half scaled 4 times:
  - first time at top left
  - then at its right, mirroring accordingly
  - etc

  --
  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

 --
 Ubuntu Speech 
 inputhttps://play.google.com/store/apps/details?id=com.nds.ubuntuspeechinputis
 now available on Google Play, along with Magnetic
 Door Alarm 
 apphttps://play.google.com/store/apps/details?id=com.nds.magneticdooralarm
 .

-- 
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


[android-developers] Any API's exposed for the English Premier League

2012-05-11 Thread Kunal Shah
Hello,
Am developing a widget that would refresh with a data of the current
match that is going on and the score...Similar to a free app IPL Live
Score Widget by Himashu Shringarpure...I ve the look and feel of the
app, ready but am not getting any API's that I can hook into...

Do I go by the method 
http://buildmobile.com/performing-network-updates/#fbid=eCwMXYB__NH
and if yes I would need the API s or better still please give me the
steps to be followed to complete the task. Will it require a parsing
mechanism or what???

-- 
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