• 0

[C#] Drawing outline text


Question

Hello,

I want to draw an outlined text using C#.Net. How can I do it? I think I need to use GDI but how exactly? All I know is how to draw a normal text.

Thanks in advance for your help :)

Link to comment
Share on other sites

Recommended Posts

  • 0

I don't know. You could effectively inline the GetStringPath code or change the method name. It's MS's API, not his. How many ways can you use AddString? This is why copyrighting code is stupid.

Link to comment
Share on other sites

  • 0
I don't know. You could effectively inline the GetStringPath code or change the method name. It's MS's API, not his. How many ways can you use AddString? This is why copyrighting code is stupid.

585288455[/snapback]

I wasn't supporting his demands I was just pointing out that clause 2 explicitly prohibits the case of giving out the source code. I would say that the small snippet used to GetString isn't worthy of even a mention - just read the book, understand the code and type it in yourself!

As for copyrighting code being stupid - I would far rather companies be able to copyright their code than patent it! I don't mind having to understand the problem and then write my own code to avoid the copyright, but not actually being able to produce code because it violates a patent is truly a horrific scenario...in the end you will not be able to code at all without falling foul of a patent. By that measure, copyrights are a delightfully benign measure of protection for companies to profit from their code.

Link to comment
Share on other sites

  • 0
I wasn't supporting his demands I was just pointing out that clause 2 explicitly prohibits the case of giving out the source code. I would say that the small snippet used to GetString isn't worthy of even a mention - just read the book, understand the code and type it in yourself!

As for copyrighting code being stupid - I would far rather companies be able to copyright their code than patent it! I don't mind having to understand the problem and then write my own code to avoid the copyright, but not actually being able to produce code because it violates a patent is truly a horrific scenario...in the end you will not be able to code at all without falling foul of a patent. By that measure, copyrights are a delightfully benign measure of protection for companies to profit from their code.

585288849[/snapback]

Sorry if my tone came off as harsh. I know you were just pointing it out.

I agree with you on the patent thing. Copyright is much easier to circumvent. I just can't understand why people would even try to protect an abstract idea, especially using someone else's API. I can understand him trying to protect the rest of the work, but not a code example. To me, it's as absurd as a college professor telling you that you can't use the code he gives you in class without his written permission.

Link to comment
Share on other sites

  • 0

Exactly - how can somebody teach you how to do something and then tell you "don't use it" !? :blink: At least he allows me to use it without exposing the source code but it still sounds stupid. As weenur said - one can always change the code a bit and say the it's his code. I think that those books shouldn't copyright code at all.

Thanks weenur, at least I know I can use the code now :D

Link to comment
Share on other sites

  • 0
Exactly - how can somebody teach you how to do something and then tell you "don't use it" !? :blink: At least he allows me to use it without exposing the source code but it still sounds stupid. As weenur said - one can always change the code a bit and say the it's his code. I think that those books shouldn't copyright code at all.

Thanks weenur, at least I know I can use the code now  :D

585289213[/snapback]

Well the author has had to write the code, and if there were no copyright then a lazy author could just copy these examples verbartim and profit from someone elses work. I am pretty sure that it's not the authors intent to stop people from using the code in their own projects, especially tiny snippets such as the one you are interested in - he's just stopping the resale of his examples by a third party.

But copyright isn't a problem, if you know how to write the piece of code you write it - so long as you don't simply copy it you are free from copyright. I would just say that if you just want to copy the code then as the author for his permission as requested, if only as a common courtesy.

Link to comment
Share on other sites

  • 0
But copyright isn't a problem, if you know how to write the piece of code you write it - so long as you don't simply copy it you are free from copyright. I would just say that if you just want to copy the code then as the author for his permission as requested, if only as a common courtesy.

585289350[/snapback]

I'd ask anyway. Chris is a very nice person.

Link to comment
Share on other sites

  • 0

That's OK weenur 0 you don't need to ask, you did enough for me :laugh: Using the code is enough but I think that the copyright should be written this way:

2. No substantial portion of this source code may be used in order to create another educational resource (such as a book)? >without the express written permission of the copyright holders, where "substantial" is defined as enough code to be recognizably from this code.

The only worry of the author should be that no one else would copy his work in order to create another book, for example. Using some of the information to create another one is OK but copying all of it's content or most of it exactly as it appears in the book should be illegal.

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.