Search:

Type: Posts; User: 6tr6tr

Page 1 of 8 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    19,195

    The above draws an arc properly, but it's not...

    The above draws an arc properly, but it's not anti-aliased. Any idea how to calculate where to draw pixels (and of what opacity) to do anti-aliasing?
  2. Replies
    7
    Views
    19,195

    Found one on wikipedia that works really well! (I...

    Found one on wikipedia that works really well! (I altered it slightly)



    function drawCircle( xMidPoint, yMidPoint, radius)
    {
    var f = 1 - radius;
    var ddF_x = 1;
    var ddF_y = -2 * radius;...
  3. Replies
    7
    Views
    19,195

    Thanks for posting that but for some reason, the...

    Thanks for posting that but for some reason, the arc (or circle) dissapears as it nears the left and right extremes. Any idea why and how to adjust that? The top and bottom show perfectly.
  4. Replies
    7
    Views
    19,195

    Algorithm for drawing arc?

    I'm trying to find an algorithm for drawing an arc but have been unable to find one (most simply use existing libraries). Does anyone know where I might look for some sample code to play with? (And...
  5. Yeah, I thought that sizeof() would be the same...

    Yeah, I thought that sizeof() would be the same for a malloc'd array and a char[] array.
  6. Thanks guys!

    Thanks guys!
  7. Why return malloc'd char array not work, but local char array does?

    Inside a function, I create a char array which I pass to a library function that fills it with a value. I then pass this back to the caller. When I do it by creating an array with malloc (and then...
  8. Why is malloc'd char array not working but char p[256] is?

    Inside a function, I create a char array which I pass to a library function that fills it with a value. I then pass this back to the caller. When I do it by creating an array with malloc (and then...
  9. Why does this not work when passed through a function?

    Why is this not working when called in a function?

    This does NOT work (see next code section for one that does work):


    int getString(usb_device_handle* h, int index, char* buff)
    {
    ...
  10. Replies
    3
    Views
    1,068

    Thanks guys! It's really just for learning/fun...

    Thanks guys! It's really just for learning/fun purposes. :) I ended up going with SnoopyPro.
  11. Replies
    3
    Views
    1,068

    How grab all messages to/from USB port?

    How do i grab all the messages sent to and from a USB port?
  12. Is XLib included in all Linux Distros? What about Solaris/OSX?

    I'm looking to get the position of the mouse on the screen. I'm hoping that there's one library that all linux distros use (so i don't have to worry about bundling/requiring any external libraries...
  13. Replies
    4
    Views
    1,751

    Thanks, I'll look that up. What I am doing is...

    Thanks, I'll look that up.

    What I am doing is figuring out which "diff" is less and then making that be the number of steps.
  14. Replies
    4
    Views
    1,751

    Best way to calculate these steps?

    I have a canvas with something at a point and when the user enters in a new point, to move it to there. The issue is that i want to move it "evenly" and smoothly.

    If abs( x - newX ) == abs( y -...
  15. As best I can gather from the code: unsigned4...

    As best I can gather from the code:

    unsigned4 = unsigned int
    signed2 = signed short int
  16. how achieve split of unsigned4 into two signed2's using bit-wise instead of union?

    I know this code is completely valid but in the interest of learning, how would I achieve the same thing as below using bitwise operations on the unsigned4 value instead of the union "trick"?


    ...
  17. Replies
    6
    Views
    1,970

    One question: when constructing the last byte,...

    One question:

    when constructing the last byte, why is it "& 15" and not "& 255"? Aren't we constructing an 8-bit byte? Or is it that it won't matter, it's the same thing since everything moving in...
  18. Replies
    6
    Views
    1,970

    THANK YOU! That was a fantastic explanation! I...

    THANK YOU! That was a fantastic explanation!

    I was pretty close to figuring it out but what threw me off was the second line where the byte is "and"-ed with 3: (tagSize[1] & 3). I was reading that...
  19. Replies
    6
    Views
    1,970

    Can you explain these bitwise operations?

    I am working with a file that has a header with the size of the file encoded into 4 bytes like:



    I have found someone's code that puts this together into the integer value, but i don't...
  20. Replies
    5
    Views
    1,394

    I was able to solve this by also installing the...

    I was able to solve this by also installing the older c++ libs (libstdc++5 files). This allowed it to compile but now it says there may be a conflict with 6! Any idea what the risks are?
  21. Replies
    5
    Views
    1,394

    I did that and now it says: warning:...

    I did that and now it says:

    warning: libstdc++.so.5, needed by /home/MyName/development/VXML/ext/lib/libxerces-c.so.23, not found (try using -rpath or -rpath-link)

    How do I resolve that? I know...
  22. Replies
    5
    Views
    1,394

    It's constructed by an environment variable. But...

    It's constructed by an environment variable. But when I change that, it still gives the error.
  23. Replies
    5
    Views
    1,394

    Linker problem I think

    I'm compiling some code and it has a bunch of "undefined reference" due to the error:

    warning: libxerces-c.so.23, needed by build/i386-linux/debug/lib/libVXID.so, not found (try using -rpath or...
  24. Replies
    3
    Views
    1,092

    So is this the correct code? I added typename in...

    So is this the correct code? I added typename in two places:



    template <class T> static void ensureCapacity(std::basic_string<T>& buffer,
    ...
  25. Replies
    3
    Views
    1,092

    What's this error mean? size_type not a type in template?

    I'm trying to build some 3rd party code and I'm getting an error:

    ValueToString.cpp:70: error: ‘std::basic_string::size_type’ is not a type

    The offending code:


    template <class T> static...
Results 1 to 25 of 186
Page 1 of 8 1 2 3 4