<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame">
    <title>gmane.comp.python.pygame</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23903"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23902"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23901"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23900"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23899"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23898"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23897"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23896"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23895"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23894"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23893"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23892"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23891"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23890"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23889"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23888"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23887"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23886"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23885"/>
        <rdf:li rdf:resource="http://permalink.gmane.org/gmane.comp.python.pygame/23884"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23903">
    <title>Re: Why does pygame.sndarray.make_sound seemingly quadruple the sound duration?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23903</link>
    <description>&lt;pre&gt;good call, thanks!

On Mon, May 21, 2012 at 3:59 PM, Nicholas Seward
&amp;lt;nicholas.seward-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Mike Lawrence</dc:creator>
    <dc:date>2012-05-21T19:01:09</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23902">
    <title>Re: Why does pygame.sndarray.make_sound seemingly quadruple the sound duration?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23902</link>
    <description>&lt;pre&gt;a = a.astype(numpy.float16)
should convert the array over for you.
Note: float16 did not exist prior to numpy1.6.  The default version of
numpy that I got from the ubuntu repo was only version 1.5.1.

On Mon, May 21, 2012 at 1:29 PM, Mike Lawrence &amp;lt;mike.lwrnc-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Nicholas Seward</dc:creator>
    <dc:date>2012-05-21T18:59:40</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23901">
    <title>Re: Why does pygame.sndarray.make_sound seemingly quadruple the sound duration?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23901</link>
    <description>&lt;pre&gt;Thanks for your response. Support for your suggestion comes from
observation that changing the size from -16 to -8 yields an octupling
of the duration. So it seems that pygame.sndarray.make_sound isn't
properly accounting for the bit depth of the numpy array.

On Mon, May 21, 2012 at 3:03 PM, Nicholas Seward
&amp;lt;nicholas.seward-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Mike Lawrence</dc:creator>
    <dc:date>2012-05-21T18:29:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23900">
    <title>Re: Why does pygame.sndarray.make_sound seemingly quadruple the sound duration?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23900</link>
    <description>&lt;pre&gt;Could it be that a is an array of 64bit floats and each array element
becomes 4 16-bit samples?

On Mon, May 21, 2012 at 12:54 PM, Mike Lawrence &amp;lt;mike.lwrnc-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Nicholas Seward</dc:creator>
    <dc:date>2012-05-21T18:03:18</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23899">
    <title>Why does pygame.sndarray.make_sound seemingly quadruple the sound duration?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23899</link>
    <description>&lt;pre&gt;The following code:

    import pygame, numpy
    pygame.mixer.pre_init(frequency=96000,size=-16,channels=1)
    pygame.init()
    a = numpy.random.randn(96000)
    sound = pygame.sndarray.make_sound(a)
    print sound.get_length()

yields a print-out of 4.0, suggesting that the specified duration of
96000 samples at a 96000kHz sampling rate was somehow quadrupled
somewhere along the way. Any idea what I'm missing here? Or is this a
bug?

&lt;/pre&gt;</description>
    <dc:creator>Mike Lawrence</dc:creator>
    <dc:date>2012-05-21T17:54:37</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23898">
    <title>Re: Monospaced fonts are meant to be mono-spaced, right?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23898</link>
    <description>&lt;pre&gt;
YES! This, this, a thousand times THIS!

---
James paige

&lt;/pre&gt;</description>
    <dc:creator>James Paige</dc:creator>
    <dc:date>2012-05-15T04:31:14</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23897">
    <title>Re: Issue with pygame.mask</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23897</link>
    <description>&lt;pre&gt;


 +1 to have *clean* functions

claudio

--
&lt;/pre&gt;</description>
    <dc:creator>claudio canepa</dc:creator>
    <dc:date>2012-05-14T23:39:30</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23896">
    <title>Re: Issue with pygame.mask</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23896</link>
    <description>&lt;pre&gt;

There's still a problem at the other end of the range, i.e.
no value that you can supply will match everything. There's
no workaround for that, so I think it should be regarded
as a bug.

If breakage is a concern, maybe a new function should be
added and the old one deprecated.

&lt;/pre&gt;</description>
    <dc:creator>Greg Ewing</dc:creator>
    <dc:date>2012-05-14T23:24:22</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23895">
    <title>Re: Monospaced fonts are meant to be mono-spaced, right?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23895</link>
    <description>&lt;pre&gt;
No, that's not the way it should work. I just tried an experiment:

 &amp;gt;&amp;gt;&amp;gt; f = Font("VeraMono.ttf", 12)
 &amp;gt;&amp;gt;&amp;gt; f.size("e")
(7, 15)
 &amp;gt;&amp;gt;&amp;gt; f.size("i")
(7, 15)

I suspect that the system is not actually giving you a
monospaced font. If it doesn't recognise the font name
you give it, you'll probably get some default font. Have
you tried rendering any text with the font to see what
it looks like?

I've given up on using SysFont because the results are
too unpredictable cross-platform. I always bundle my
own fonts with my games and use Font to load them
explicitly.

I like to use the Bitstream Vera fonts. They're nice,
small and very liberally licensed.

http://ftp.gnome.org/pub/GNOME/sources/ttf-bitstream-vera/1.10/

&lt;/pre&gt;</description>
    <dc:creator>Greg Ewing</dc:creator>
    <dc:date>2012-05-14T23:23:58</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23894">
    <title>Re: Monospaced fonts are meant to be mono-spaced, right?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23894</link>
    <description>&lt;pre&gt;Are you accounting correctly for non-integer character width?  If it's
always the same letter /position/ that's giving you trouble, then it's
possible that the width of the character is not an integer in that
size, and your text renderer may be accounting for that in ways that
your own program is not.

On Mon, May 14, 2012 at 9:25 AM, Nicholas Seward
&amp;lt;nicholas.seward-Re5JQEeQqe8AvxtiuMwx3w&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Dan Uznanski</dc:creator>
    <dc:date>2012-05-14T19:10:59</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23893">
    <title>Re: Issue with pygame.mask</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23893</link>
    <description>&lt;pre&gt;It seems super unlikely that code in the wild would depend on the
nonfunctional default value unless they use it as a hack to purposely
get an empty mask.  I think making the default threshold=(1,1,1,255)
would be the most diplomatic solution.

On Mon, May 14, 2012 at 9:32 AM, Peter Finlayson &amp;lt;frnknstn-LUMrtvHz1xZBDgjK7y7TUQ&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Nicholas Seward</dc:creator>
    <dc:date>2012-05-14T15:04:53</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23892">
    <title>Re: Issue with pygame.mask</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23892</link>
    <description>&lt;pre&gt;
Yeah, I had a look too. I would still call this is a bug. The similar from_surface() function tests if the value crosses 
the threshold and uses 'if (a &amp;gt; threshold)'. This function tests if the value is WITHIN the threshold, and should use 
the complementary 'if (abs((b - a) &amp;lt;= threshold)'.

Regardless, since there is code out in the wild that probably depends on this behaviour it is probably best to just note 
the quirk in the documentation. Changing the default may also be an option, because I can't think of any reason someone 
would want the function to be non-functional by default.

Regards,
Peter Finlayson

&lt;/pre&gt;</description>
    <dc:creator>Peter Finlayson</dc:creator>
    <dc:date>2012-05-14T14:32:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23891">
    <title>pygame.mask.from_surface</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23891</link>
    <description>&lt;pre&gt;One of my students was doing pixel perfect collisions with Sprites and
found what may be a bug.  pygame.mask.from_surface seemed to return an
empty mask when everything on a surface is opaque.  In this situation
rectangle collisions made more sense but I am still curious why
pygame.mask.from_surface is behaving this way.  I quickly dug through
the source and nothing popped out as the cause.

&lt;/pre&gt;</description>
    <dc:creator>Nicholas Seward</dc:creator>
    <dc:date>2012-05-14T14:12:01</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23890">
    <title>Re: Issue with pygame.mask</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23890</link>
    <description>&lt;pre&gt;else if ((abs((((the_color &amp;amp; rmask) &amp;gt;&amp;gt; rshift) &amp;lt;&amp;lt; rloss) - r) &amp;lt; tr) &amp;amp;
                       (abs((((the_color &amp;amp; gmask) &amp;gt;&amp;gt; gshift) &amp;lt;&amp;lt; gloss)
- g) &amp;lt; tg) &amp;amp;
                       (abs((((the_color &amp;amp; bmask) &amp;gt;&amp;gt; bshift) &amp;lt;&amp;lt; bloss)
- b) &amp;lt; tb)) {
                /* this pixel is within the threshold of the color. */
                bitmask_setbit(m, x, y);

I wrote the top comment but I didn't need perfect matching at the
time.  I just dug through the source and found what is going on for
real.  It seem that I was right except you don't get to include the
endpoints.

You are right that a 0 threshold will do nothing.  The default
threshold = (0,0,0,255) won't do anything.  I retested that statement
because that doesn't seem right but that is how it is.

On Mon, May 14, 2012 at 7:01 AM, Peter Finlayson &amp;lt;frnknstn-LUMrtvHz1xZBDgjK7y7TUQ&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Nicholas Seward</dc:creator>
    <dc:date>2012-05-14T13:54:05</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23889">
    <title>Re: Monospaced fonts are meant to be mono-spaced, right?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23889</link>
    <description>&lt;pre&gt;The letters may be different lengths.  However, the letters should be
spaced equally.  For example,"i" will be shorter than "w" but "hit"
and "hot" should be the same length.

On Mon, May 14, 2012 at 5:25 AM, Sam Bull &amp;lt;sam.hacking-vRdzynncJC4&amp;lt; at &amp;gt;public.gmane.org&amp;gt; wrote:

&lt;/pre&gt;</description>
    <dc:creator>Nicholas Seward</dc:creator>
    <dc:date>2012-05-14T13:25:41</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23888">
    <title>Re: Issue with pygame.mask</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23888</link>
    <description>&lt;pre&gt;
The third comment is incorrect, the topmost closer to what I have found by testing.

The function (as I expected, and as testing shows) works kind of like the magic wand in some image editing software: it 
takes a color and a threshold, and returns a mask containing all the pixels with color values that are within that 
threshold of the supplied color. (I have updated my test prog to highlight that.)

However, there appears to be an off-by-one error in the function: a threshold of zero, to my mind, should match only the 
exact color, and a threshold of (255,255,255) should match all colors regardless of the base color.

Instead, a threshold of zero matches nothing, and it is impossible to match all the colors.

Before I go digging into the PyGame code to see if I can fix this, I wanted to check if this is actually a bug, or if it 
is by design. I guess if there is nobody here knows, I will have to hit the code :)

Regards
Peter Finlayson
&lt;/pre&gt;</description>
    <dc:creator>Peter Finlayson</dc:creator>
    <dc:date>2012-05-14T12:01:20</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23887">
    <title>Monospaced fonts are meant to be mono-spaced, right?</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23887</link>
    <description>&lt;pre&gt;Before I go and file a bug against Ubuntu, can somebody confirm I'm not
being stupid.

For my input boxes, the cursor position depends on a monospaced font.
This means I check the length of a rendered letter ("e") using the font,
and then set the cursor position as a multiple of this length.

This worked fine before, but in Ubuntu 12.04, it no longer seems to be
monospaced. Getting the length of the character "e" on my system gives
me 9 pixels, but it seems that some characters, such as "h", are 10
pixels, which starts offsetting my cursor position and messing up my
input box.

The line I use to load the font is:
        pygame.font.SysFont("FreeMono, Monospace", 16)

That should definitely return a monospaced font, right?

And, the line used for getting the width is:
        mono_font.render("e", False, (0,0,0)).get_size()[0]

Is this a bug, or am I doing something stupid?


&lt;/pre&gt;</description>
    <dc:creator>Sam Bull</dc:creator>
    <dc:date>2012-05-14T10:25:00</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23886">
    <title>Re: Issue with pygame.mask</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23886</link>
    <description>&lt;pre&gt;
The third comment about that function here seems to explain
what's happening:

    http://www.pygame.org/docs/ref/mask.html

"This creates a mask from the surface which has all the pixels set which have
color values above or equal to those in color, but below (and not equal to) the
values in threshold. So no pixel with a 255 value can possibly be considered.
And the default threshold doesn't let the mask have any set pixels for any given
surface."

However this seems to contradict what is said in the second
comment, so it may be a case of the blind leading the blind.

&lt;/pre&gt;</description>
    <dc:creator>Greg Ewing</dc:creator>
    <dc:date>2012-05-14T08:24:27</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23885">
    <title>Re: pygame.org wiki spam</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23885</link>
    <description>&lt;pre&gt;
The accounts need to be deleted and an account approval system needs to be 
set up.  That's how we stopped that crap on a development wiki for 
X-Plane.

g.

&lt;/pre&gt;</description>
    <dc:creator>Gene Buckle</dc:creator>
    <dc:date>2012-05-12T13:56:07</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23884">
    <title>pygame.org wiki spam</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23884</link>
    <description>&lt;pre&gt;Hello,

I've been fighting the great fight against spam on the pygame.org wiki, 
but there's at least 2 accounts that seem to be doing automated changes: 
  spainadmon and Ronald Derren.  The Derren account is being 
particularly nasty these past few days.

I've gone from direct editing to reverts, but it's hard to keep up.  I 
could whip up an automated removal tool of my own but that wouldn't 
really fix the problem, and it just seems ungentlemanly to do the same 
as the attackers (even though I have better intentions).

Can prevention tools be added to the site?  Captcha's, IP blocks, 
anything?  I hate to see the site just plowed under by the BadGuys.

I feel for the webmaster(s), this isn't meant as a knock.  The attackers 
always have the advantage and I know it never ends.


Regards,

Winter

(W. Fielder on the pygame wiki recent changes)

&lt;/pre&gt;</description>
    <dc:creator>Winter</dc:creator>
    <dc:date>2012-05-11T21:32:45</dc:date>
  </item>
  <item rdf:about="http://permalink.gmane.org/gmane.comp.python.pygame/23883">
    <title>Issue with pygame.mask</title>
    <link>http://permalink.gmane.org/gmane.comp.python.pygame/23883</link>
    <description>&lt;pre&gt;Hi,

I am using pygame.mask.from_surface(Surface, color, threshold = (0,0,0,255)) to convert a surface into a 2D binary mask.

I expected the default threshold (0,0,0) of this function to have it match only that the exact color specified (ie 
within 0 values of the color). However, it seems that it instead matches NO pixels. To get the behaviour I expected I 
needed to specify a threshold of (1, 1, 1, 255)

Is this a bug, or are my expectations wrong?

Regards,
Peter Finlayson
&lt;/pre&gt;</description>
    <dc:creator>Peter Finlayson</dc:creator>
    <dc:date>2012-05-11T08:38:30</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.python.pygame">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.python.pygame</link>
  </textinput>
</rdf:RDF>

