User Profile

Collapse

Profile Sidebar

Collapse
WRoos
WRoos
Last Activity: Oct 12 '12, 02:05 PM
Joined: Oct 10 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • I know about Drag/Drop to use for contents of a control (maybe a certain line in a listbox)to Drag to another control, or Drag the total control to a different location.

    If you drawn a rectangle on a form, and want it to be somewhere else it is easiest to erase the first one, then draw it on the new position again.
    You could try "Canvas->Pen->Mode = pmXor;" while drawing your rectangle. This is special, because...
    See more | Go to post

    Leave a comment:


  • WRoos
    replied to Canvas->CopyRect shifts 1 pixel by zoomed image
    in C
    I made a compleet program with my problem.
    If someone is willing to help, he/she can take this code in a new project,
    1)define the RMinR function in the .h file
    2)define the FormPaint-event in the Form
    3)run.

    It paints a bitmap in 5 parts. If you look closely you can see the center and the part right to the center are shifted 1 pixel.
    For some bitmaps this is more disturbing then for others.
    if you...
    See more | Go to post
    Last edited by Niheel; Oct 11 '12, 07:35 PM.

    Leave a comment:


  • JulDate=[1461* (year+4716)/4] + [153* (month+1)/5]+Day+2-[year/100]+[year/400]-1524,5

    use for january 13, for february 14 and subtract 1 from year
    [...] means must be truncated in an integer.

    Your right year 0 does not exist, but every year not using the Greorian calander (leapyears) are hypotatical. I've read ones the last european country to use the Grogorian calander is Turkey in 1927.
    See more | Go to post

    Leave a comment:


  • WRoos
    replied to Problem with Master/Slave program
    in C
    I have no experience with programs without forms, but I see 2 problems:

    int sumsTemp[argc];
    1) You can't declare tables in this way. the computer needs to know at compile-time how many memory will be used. You can solve this by defining tables for 100 int's. Always enough...
    or you can use
    Code:
    int* sumsTemp = malloc(argc*sizeof(int));
    int count = sumsTemp[index];     // use as usual
    free(sumsTemp)
    ...
    See more | Go to post

    Leave a comment:


  • WRoos
    replied to Canvas->CopyRect shifts 1 pixel by zoomed image
    in C
    Code:
    //I'm using struct: FObject containing: 
    //	bitmap
    //    srect: position on screen
    //    brect: position in bitmap (bitmap's in bitmap's)
    //
    // mylist start with the ClipRect (the invalidated rect for my control)
     OnPaint()
    {
     TRect rmr[5], *todo;
    
     Canvas->CopyMode = cmSrcCopy;
     for (int n=FObjects->Count-1; n>=0; n--) {  // last bitmap first
       have = (TBBObject*)
    ...
    See more | Go to post
    Last edited by Meetee; Oct 11 '12, 11:02 AM. Reason: use code tags <code/> around your code

    Leave a comment:


  • If your developping under Windows, there's a global variable something like "longdateformat " if it has a value with 1d it showns the day without leading zero, 2d's with leading zero and 3d's as a full name. (I'm doing this by memory so it might not be completely right, but close enough)
    If your OS can not do this, you best calculate a juliandatenumbe r. This can give the number of days past since year 0.
    See more | Go to post

    Leave a comment:


  • WRoos
    started a topic Canvas->CopyRect shifts 1 pixel by zoomed image
    in C

    Canvas->CopyRect shifts 1 pixel by zoomed image

    I'm building a bitmapmanipulat ion-component in C++Builder6

    After loading a bitmap in my component, I then can make a selection, which can be moved around.

    The problem I have is in my OnPaint-event. I paint the topmost bitmap first(the selection), then find the parts that not have been painted, and paint those parts from the original bitmap.
    If the bitmaps are zoomed-out (smaller on the screen) the original bitmap...
    See more | Go to post
No activity results to display
Show More
Working...