[Mono-dev] Bitmap manipulation - am I doing it right?

2009-03-31 Thread Stifu

Hello,

I have an application that displays graphics, stored in a Bitmap.
When you hover the concerned Panel, a square shows what tile you're
currently highlighting. So if you move your cursor, the square moves too.

What I'm doing is, each time I repaint my Panel, clone the Bitmap then draw
the rectangle (square) on it. If I didn't clone it first and worked directly
with the original Bitmap, then the squares would never go away, and keep on
multiplying as you move your cursor over the Panel.
So I'm just wondering: is cloning the right thing to do here? Or is there a
better / more efficient way to achieve the same results, like some kind of
temporary modifications to a Bitmap or whatever? (I'm using double
buffering, so everything has to be on the same Bitmap)

I already implemented clipping to improve performances, but I wanted to know
if there was anything else I could do... Thanks.
-- 
View this message in context: 
http://www.nabble.com/Bitmap-manipulation---am-I-doing-it-right--tp22800298p22800298.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Problem using Mono under Apache:

2009-03-31 Thread feffus

thank you Robert
I'm waiting this new version with open arms.
I wish it will solve my problem.
In the meantime is there anyone else that can give me some suggest?
ty


Robert Jordan wrote:
 
 feffus wrote:
 
 The problem is the following:
 When the site receives more than 50 simultaneous connections, it becomes
 unreachable even thought Apache seems to work.
 Do anyone know why?
 tnx
 
 
 I attach:
 - Apache server status when the service falls down
 - Apache configuration file
 
 Try to lower these settings:
 
 MonoMaxActiveRequests
 MonoMaxWaitingRequests
 
 Note that raising them like you did won't help at all, because they
 were introduced intentionally to *limit* the requests to an amount
 that can be safely processed by an application.
 
 Robert
 
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 

-- 
View this message in context: 
http://www.nabble.com/Problem-using-Mono-under-Apache%3A-tp22725279p22800859.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Embedded: storing extra data on objects?

2009-03-31 Thread Robert Jordan
David Mitchell wrote:
 When embedding mono, is there a way to store a little bit of extra
 information (pointer-sized) along with a MonoObject (or similar structure)?
 
 My scenario is that I have unmanaged wrappers for managed objects, and I¹d
 like to ensure that there is never more than one unmanaged wrapper per
 object (and also be able to get the unmanaged wrapper if all I have is the
 object). I¹m sure I know that I could use a hash table for this, and that
 may end up being what I do, but actually storing the pointer on the
 MonoObject seems more natural, in my case.

I wonder why your wrapper must have 1:1 relationship with the object
it wraps.

Supposing you really need this 1:1 relationship, how do you handle the
liveness of the wrapper? If there is only one pointer to its instance,
it will go away together with the MonoObject when the latter gets
garbage collected, so you won't be able to free it.

Robert

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Bitmap manipulation - am I doing it right?

2009-03-31 Thread Andreas Nahr
What you are doing is very inefficient.
Two ideas:
1) Don't directly draw onto the image if you are only want so show something
to the user and not really want to manipulate the image. You could easily
use a rectangle control and show that above the image control.
2) Before you paint the rectangle copy the overpainted area into a temporary
image. Then draw the rectangle. To (re)move the rectangle copy the data back
from the temporary image (do not copy the entire image or create a new one)

Andreas

-Ursprüngliche Nachricht-
Von: mono-devel-list-boun...@lists.ximian.com
[mailto:mono-devel-list-boun...@lists.ximian.com] Im Auftrag von Stifu
Gesendet: Dienstag, 31. März 2009 10:10
An: mono-devel-list@lists.ximian.com
Betreff: [Mono-dev] Bitmap manipulation - am I doing it right?


Hello,

I have an application that displays graphics, stored in a Bitmap.
When you hover the concerned Panel, a square shows what tile you're
currently highlighting. So if you move your cursor, the square moves too.

What I'm doing is, each time I repaint my Panel, clone the Bitmap then draw
the rectangle (square) on it. If I didn't clone it first and worked directly
with the original Bitmap, then the squares would never go away, and keep on
multiplying as you move your cursor over the Panel.
So I'm just wondering: is cloning the right thing to do here? Or is there a
better / more efficient way to achieve the same results, like some kind of
temporary modifications to a Bitmap or whatever? (I'm using double
buffering, so everything has to be on the same Bitmap)

I already implemented clipping to improve performances, but I wanted to know
if there was anything else I could do... Thanks.
-- 
View this message in context:
http://www.nabble.com/Bitmap-manipulation---am-I-doing-it-right--tp22800298p
22800298.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Bitmap manipulation - am I doing it right?

2009-03-31 Thread Stifu

Hi Andreas,

Thanks for your reply.

The size and the color of the rectangle can vary, and it can also be
semi-transparent, so I'm not sure making it a control is possible.
Your second idea is interesting, though, I'll have to try it.

By the way, I also wanted to clone because I show a small part of a big
image (and you can scroll through the Panel to show the other parts), and
didn't want to draw anything too big on my Panel (too big as in, bigger
than the Panel size, so out of bounds). So I actually have 2 Bitmaps in
memory: the whole image, and the partial (on-screen) image, and so I simply
clone the latter each time and update it when necessary (ie: when you scroll
or resize the window).
Your solution would be helpful when hovering the image to draw the rectangle
(which was fast already), but not when scrolling through the Panel (the
slowest part)... Not sure if I can do anything to make scrolling faster.


Andreas Nahr wrote:
 
 What you are doing is very inefficient.
 Two ideas:
 1) Don't directly draw onto the image if you are only want so show
 something
 to the user and not really want to manipulate the image. You could easily
 use a rectangle control and show that above the image control.
 2) Before you paint the rectangle copy the overpainted area into a
 temporary
 image. Then draw the rectangle. To (re)move the rectangle copy the data
 back
 from the temporary image (do not copy the entire image or create a new
 one)
 
 Andreas
 
 -Ursprüngliche Nachricht-
 Von: mono-devel-list-boun...@lists.ximian.com
 [mailto:mono-devel-list-boun...@lists.ximian.com] Im Auftrag von Stifu
 Gesendet: Dienstag, 31. März 2009 10:10
 An: mono-devel-list@lists.ximian.com
 Betreff: [Mono-dev] Bitmap manipulation - am I doing it right?
 
 
 Hello,
 
 I have an application that displays graphics, stored in a Bitmap.
 When you hover the concerned Panel, a square shows what tile you're
 currently highlighting. So if you move your cursor, the square moves too.
 
 What I'm doing is, each time I repaint my Panel, clone the Bitmap then
 draw
 the rectangle (square) on it. If I didn't clone it first and worked
 directly
 with the original Bitmap, then the squares would never go away, and keep
 on
 multiplying as you move your cursor over the Panel.
 So I'm just wondering: is cloning the right thing to do here? Or is there
 a
 better / more efficient way to achieve the same results, like some kind of
 temporary modifications to a Bitmap or whatever? (I'm using double
 buffering, so everything has to be on the same Bitmap)
 
 I already implemented clipping to improve performances, but I wanted to
 know
 if there was anything else I could do... Thanks.
 -- 
 View this message in context:
 http://www.nabble.com/Bitmap-manipulation---am-I-doing-it-right--tp22800298p
 22800298.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 

-- 
View this message in context: 
http://www.nabble.com/Bitmap-manipulation---am-I-doing-it-right--tp22800298p22804927.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Announcing the release of Mono 2.4...

2009-03-31 Thread Thomas Wiest
Today we're announcing the immediate release of Mono 2.4.

The release notes are here:

http://www.mono-project.com/Release_Notes_Mono_2.4

and downloads are available here:

http://www.mono-project.com/Downloads

Thanks to all those who contributed to this release!  :) 

Thomas

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] [Mono-debugger] Introducint ourselves

2009-03-31 Thread Friedrich
Dear Mono Developers, I guess I will start bothering you with quite a
few questions. We were asked from unity3d to port the mono debugger
to Windows. We are at the beginning of this work, but Jonathan
Chambers seem  to have started on this undertaking. Mr Ante form
Unity3d was very clear about this development and that it all has to
go through this mailing list. So I hope that some of you will bear
with us and help us getting this port done.

With best regards
Friedrich


-- 
Q-Software Solutions GmbH; Sitz: Bruchsal; Registergericht: Mannheim 
Registriernummer: HRB232138; Geschaeftsfuehrer: Friedrich Dominicus
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Embedded: storing extra data on objects?

2009-03-31 Thread David Mitchell


Robert Jordan wrote:
 
 David Mitchell wrote:
 When embedding mono, is there a way to store a little bit of extra
 information (pointer-sized) along with a MonoObject (or similar
 structure)?
 
 My scenario is that I have unmanaged wrappers for managed objects, and
 I¹d
 like to ensure that there is never more than one unmanaged wrapper per
 object (and also be able to get the unmanaged wrapper if all I have is
 the
 object). I¹m sure I know that I could use a hash table for this, and that
 may end up being what I do, but actually storing the pointer on the
 MonoObject seems more natural, in my case.
 
 I wonder why your wrapper must have 1:1 relationship with the object
 it wraps.
 

I'm working on a bridging scenario between Objective C and Mono that is not
addressed by existing solutions.



 
 Supposing you really need this 1:1 relationship, how do you handle the
 liveness of the wrapper? If there is only one pointer to its instance,
 it will go away together with the MonoObject when the latter gets
 garbage collected, so you won't be able to free it.
 
 

The wrapper has an unpinned gchandle to the object, so the MonoObject won't
be garbage collected until I release the wrapper--whose lifetime is handled
by Objective C code.



 
 Robert
 
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 

-- 
View this message in context: 
http://www.nabble.com/Embedded%3A-storing-extra-data-on-objects--tp22787556p22805218.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Bitmap manipulation - am I doing it right?

2009-03-31 Thread Stifu

Thanks for your answer.

1) I'm not sure how that would work... Not saying it's not possible or
anything, I just have no idea. By the way, the size and the color of the
rectangle can vary, and it can also be semi-transparent (in case that's a
problem).
2) How would you do this, technically? Because the only solution that comes
to my mind is to clone a little part of my Bitmap to create the temporary
copy... and making a sub-sized clone of a Bitmap is actually much slower
than making a full clone. So it'd be actually slower than my current
implementation.


Andreas Nahr wrote:
 
 What you are doing is very inefficient.
 Two ideas:
 1) Don't directly draw onto the image if you are only want so show
 something
 to the user and not really want to manipulate the image. You could easily
 use a rectangle control and show that above the image control.
 2) Before you paint the rectangle copy the overpainted area into a
 temporary
 image. Then draw the rectangle. To (re)move the rectangle copy the data
 back
 from the temporary image (do not copy the entire image or create a new
 one)
 
 Andreas
 
 -Ursprüngliche Nachricht-
 Von: mono-devel-list-boun...@lists.ximian.com
 [mailto:mono-devel-list-boun...@lists.ximian.com] Im Auftrag von Stifu
 Gesendet: Dienstag, 31. März 2009 10:10
 An: mono-devel-list@lists.ximian.com
 Betreff: [Mono-dev] Bitmap manipulation - am I doing it right?
 
 
 Hello,
 
 I have an application that displays graphics, stored in a Bitmap.
 When you hover the concerned Panel, a square shows what tile you're
 currently highlighting. So if you move your cursor, the square moves too.
 
 What I'm doing is, each time I repaint my Panel, clone the Bitmap then
 draw
 the rectangle (square) on it. If I didn't clone it first and worked
 directly
 with the original Bitmap, then the squares would never go away, and keep
 on
 multiplying as you move your cursor over the Panel.
 So I'm just wondering: is cloning the right thing to do here? Or is there
 a
 better / more efficient way to achieve the same results, like some kind of
 temporary modifications to a Bitmap or whatever? (I'm using double
 buffering, so everything has to be on the same Bitmap)
 
 I already implemented clipping to improve performances, but I wanted to
 know
 if there was anything else I could do... Thanks.
 -- 
 View this message in context:
 http://www.nabble.com/Bitmap-manipulation---am-I-doing-it-right--tp22800298p
 22800298.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.
 
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list
 
 

-- 
View this message in context: 
http://www.nabble.com/Bitmap-manipulation---am-I-doing-it-right--tp22800298p22813327.html
Sent from the Mono - Dev mailing list archive at Nabble.com.

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Bitmap manipulation - am I doing it right?

2009-03-31 Thread Stefanos A.
Does GDI+ support alpha blending? If so, why don't you just draw a  
translucent (say alpha = 128) layer on top of the selected region? You  
could also fake this with additive or multiplicative blending, but the  
result will look worse.



Την Wed, 01 Apr 2009 00:11:37 +0300,ο(η) Stifu st...@free.fr έγραψε:


 Thanks for your answer.

 1) I'm not sure how that would work... Not saying it's not possible or
 anything, I just have no idea. By the way, the size and the color of the
 rectangle can vary, and it can also be semi-transparent (in case that's a
 problem).
 2) How would you do this, technically? Because the only solution that  
 comes
 to my mind is to clone a little part of my Bitmap to create the temporary
 copy... and making a sub-sized clone of a Bitmap is actually much slower
 than making a full clone. So it'd be actually slower than my current
 implementation.


 Andreas Nahr wrote:

 What you are doing is very inefficient.
 Two ideas:
 1) Don't directly draw onto the image if you are only want so show
 something
 to the user and not really want to manipulate the image. You could  
 easily
 use a rectangle control and show that above the image control.
 2) Before you paint the rectangle copy the overpainted area into a
 temporary
 image. Then draw the rectangle. To (re)move the rectangle copy the data
 back
 from the temporary image (do not copy the entire image or create a new
 one)

 Andreas

 -Ursprüngliche Nachricht-
 Von: mono-devel-list-boun...@lists.ximian.com
 [mailto:mono-devel-list-boun...@lists.ximian.com] Im Auftrag von Stifu
 Gesendet: Dienstag, 31. März 2009 10:10
 An: mono-devel-list@lists.ximian.com
 Betreff: [Mono-dev] Bitmap manipulation - am I doing it right?


 Hello,

 I have an application that displays graphics, stored in a Bitmap.
 When you hover the concerned Panel, a square shows what tile you're
 currently highlighting. So if you move your cursor, the square moves  
 too.

 What I'm doing is, each time I repaint my Panel, clone the Bitmap then
 draw
 the rectangle (square) on it. If I didn't clone it first and worked
 directly
 with the original Bitmap, then the squares would never go away, and keep
 on
 multiplying as you move your cursor over the Panel.
 So I'm just wondering: is cloning the right thing to do here? Or is  
 there
 a
 better / more efficient way to achieve the same results, like some kind  
 of
 temporary modifications to a Bitmap or whatever? (I'm using double
 buffering, so everything has to be on the same Bitmap)

 I already implemented clipping to improve performances, but I wanted to
 know
 if there was anything else I could do... Thanks.
 --
 View this message in context:
 http://www.nabble.com/Bitmap-manipulation---am-I-doing-it-right--tp22800298p
 22800298.html
 Sent from the Mono - Dev mailing list archive at Nabble.com.

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list

 ___
 Mono-devel-list mailing list
 Mono-devel-list@lists.ximian.com
 http://lists.ximian.com/mailman/listinfo/mono-devel-list






-- 
Χρησιμοποιώ το επαναστατικό πρόγραμμα αλληλογραφίας της Opera:  
http://www.opera.com/mail/
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Assertion failure on exit -- NUnit

2009-03-31 Thread Casey Marshall
On Mar 28, 2009, at 7:32 PM, Zoltan Varga wrote:

 Hi,

   This should now be fixed in SVN HEAD and the 2.4 branch.


Was this included in the 2.4 tarball?

 Zoltan

 On Wed, Mar 25, 2009 at 9:57 PM, Casey Marshall casey.s.marsh...@gmail.com 
  wrote:
 I'm getting an intermittent assertion failure on mono 2.4 RC3, x86_64
 Ubuntu 8.04, when running NUnit 2.4.7 on an assembly that doesn't have
 any unit tests defined in it. It seems like it has something to do
 with what is happening when the program is shutting down.

 Naturally, since it's part of our unit test infrastructure, having
 mono exit with SIGABRT occasionally is noise we'd rather not have.

 Is this a known issue? Should I file a bug? I also noticed that Mono
 would fail with an assertion error in SetLastError when the program
 was exiting.

 Here's part of the output:



___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Assertion failure on exit -- NUnit

2009-03-31 Thread Zoltan Varga
No, it will be in 2.4.1.

   Zoltan

On Tue, Mar 31, 2009 at 11:58 PM, Casey Marshall casey.s.marsh...@gmail.com
 wrote:

 On Mar 28, 2009, at 7:32 PM, Zoltan Varga wrote:

  Hi,

  This should now be fixed in SVN HEAD and the 2.4 branch.


 Was this included in the 2.4 tarball?


 Zoltan

 On Wed, Mar 25, 2009 at 9:57 PM, Casey Marshall 
 casey.s.marsh...@gmail.com wrote:
 I'm getting an intermittent assertion failure on mono 2.4 RC3, x86_64
 Ubuntu 8.04, when running NUnit 2.4.7 on an assembly that doesn't have
 any unit tests defined in it. It seems like it has something to do
 with what is happening when the program is shutting down.

 Naturally, since it's part of our unit test infrastructure, having
 mono exit with SIGABRT occasionally is noise we'd rather not have.

 Is this a known issue? Should I file a bug? I also noticed that Mono
 would fail with an assertion error in SetLastError when the program
 was exiting.

 Here's part of the output:




___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Cloud Based Solution

2009-03-31 Thread Keerthi Bharath
Hello Everyone,

I want to know, whether we have already or in future have plans of
implementing windows azure services( cloud based platform) as part of Mono.
I developed an application with Azure( based on .net 3.5 sp1). It ran
without any issues with MOMA. But when I tried it with Mono develop, it says
the application is not supported. So I assume we have not developed the
apis.
So I thought, it would help the mono and suse community immensely if I try
implementing the APIs with regard to the azure services.

The azure runtime environment seems similar to ASP.net( with the xml config
files).
It would be very helpful, if you could let me know whether this is a viable
project to start working on and please let me know where I can start(
probably some pointers from people who have implemented asp.net kind of func
in to Mono)

Thanks for helping me out.
-Keerthi
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Generics problem (issue #488960)

2009-03-31 Thread Stefanos A.
Can someone please comment on bug #488960 Invalid CS0663 error with  
generics ('overloaded function cannot differ on use of parameter modifiers  
only')? Direct link: https://bugzilla.novell.com/show_bug.cgi?id=488960

Is this a difficult case? is it possible to squeeze a quick fix into 2.4.1  
(if such a release is planned)?

I hate sounding pushy, but this bug is blocking OpenTK. Fortunately, we  
can release binaries compiled on Windows. Unfortunately, this bug is  
affecting both development (as the main platform is Mono/Linux) and usage  
(because users will have to use Windows if they wish to recompile the  
library).
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] building gtk-sharp requires glib2-devel 2.18

2009-03-31 Thread Rusty Howell
I can't find glib2-devel 2.18 in any openSuse 11.0 repo. The latest I
can find is 2.16.
Building gtk-sharp from trunk requires glib2-devel 2.18. I see
glib2-devel 2.18 in the openSuse 11.1 repos.

Does anyone know where to get 2.18 for opensuse 11.0, or have all devs
upgraded to 11.1 ?

Thanks
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] Support for System.Net.ServicePoint.SetTcpKeepAlive

2009-03-31 Thread Bassam Tabbara
.NET FX 3.5 SP1 (and .NET 2.0 SP2) seems to have added a useful function to the 
System.Net.ServicePoint class - SetTcpKeepAlive. Which version of Mono would 
this be aligned to? Are there any plans to add similar support?

Thanks!
Bassam
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


Re: [Mono-dev] Bitmap manipulation - am I doing it right?

2009-03-31 Thread Robert Bielik
Stifu skrev:
 2) How would you do this, technically? Because the only solution that comes
 to my mind is to clone a little part of my Bitmap to create the temporary
 copy... and making a sub-sized clone of a Bitmap is actually much slower
 than making a full clone. So it'd be actually slower than my current
 implementation.

Make a clone which you then hold on to, and only let it grow bigger. Then you 
use that bitmap
for the operation, i.e. it only has to be created once, used many times. Makes 
sense?

/Rob
___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list