Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
211 user(s) are online (120 user(s) are browsing Forums)

Members: 3
Guests: 208

VooDoo, tekmage, flash, more...

Headlines

Forum Index


Board index » All Posts (Steady)




Re: Timberwolf!!!!
Just popping in
Just popping in


Thanks for all your hard work Friedens.

Posting using Timberwolf!

Donation made!

Go to top


Re: Using Flood()
Just popping in
Just popping in


BTW. Got the pie charting stuff working thanks to the AreaFill example.

Thanks Thomas.

Go to top


Re: Using Flood()
Just popping in
Just popping in


That's OK. I had assumed that. I might go for a few more points though as 10 degrees might have edges that are too long and straight, but we'll see.

Go to top


Re: Using Flood()
Just popping in
Just popping in


Oh yes, definitely. Flood was always my last option but I had it in my head that the area functions wouldn't work. Happily, I was wrong.

Thanks Thomas.

Go to top


Re: Using Flood()
Just popping in
Just popping in


@broadblues

Hmm. I get the same weird result in an 8-bit screen. I guess there is a bug.

Unfortunately I can't use AreaFill() because I'm filling a pie chart slice which has an arc. I guess I'll have to do my own floodfill as a workaround until it's fixed.

Go to top


Re: Using Flood()
Just popping in
Just popping in


Thanks.

Actually, the real project uses AllocRaster(). I was just experimenting in my example, but your tips are appreciated and I really should be using GetBitMapAttr() which I wasn't before, so thanks for that too.

Go to top


Re: Using Flood()
Just popping in
Just popping in


Thanks thomas and broadblues for having a look.

Firstly, I didn't realise it was the screen's rastport. I thought it was the window, so that is a definite issue. Thanks for the correction thomas.

Actually, the real program I am writing is on OS4, I just thought I would go back to a simpler example and build it up from there once it works.

On the real program I end up with the whole window being filled with corrupted rubbish when I try to floodfill. I know that what I am filling is fully enclosed. Maybe it is a 16/32 bit screen issue. I will try a few scenarios and have a look.

Cheers!

Go to top


Using Flood()
Just popping in
Just popping in


Hi all,
This might sound a bit stupid, but I've been able to most things when programming the Amiga, but flood fill isn't one of them. I have always been missing something but cannot work out what it is. Now, I really need to do it for a project I am working on and it still doesn't work.

I've knocked up a quick example to see if I could get it working but even the small example doesn't work. It's meant to draw a circle and fill it. Should be easy, right? The circle draws fine, but no fill happens. Can anyone see what I am doing wrong?

Example code below, compiled with SAS/C 6.x and run/tested on AmigaOS 4.1.4:

/* Attempt to test flood fill */
#include <exec/types.h>
#include <graphics/gfx.h>
#include <graphics/gfxmacros.h>
#include <intuition/intuition.h>

#include <proto/exec.h>
#include <proto/dos.h>
#include <proto/graphics.h>
#include <proto/intuition.h>

#include <stdlib.h>
#include <stdio.h>

int main(int argcchar *argv[])
{
    
struct Window *win;

    
win OpenWindowTags(NULL,
                         
WA_InnerWidth,    200,
                         
WA_InnerHeight,   200,
                         
WA_IDCMP,         IDCMP_CLOSEWINDOW,
                         
WA_Title,         "test flood",
                         
WA_DragBar,       TRUE,
                         
WA_CloseGadget,   TRUE,
                         
WA_NoCareRefreshTRUE,
                         
WA_SmartRefresh,  TRUE,
                         
TAG_DONE);
    if(
win)
    {
        
WORD centreXcentreY;
        
struct TmpRas tr;
        
LONG size;
        
UBYTE *buf;

        
centreX = (win->Width win->BorderLeft win->BorderRight) / 2;
        
centreY = (win->Height win->BorderTop win->BorderBottom) / 2;

        
SetOutlinePen(win->RPort1);
        
SetAPen(win->RPort1);
        
SetDrPt(win->RPort0xFF);
        
DrawCircle(win->RPortcentreXcentreY25);

        
size = (200 200) / 8;

        
buf AllocVec(sizeMEMF_CHIP);
        if(
buf)
        {
            
InitTmpRas(&trbufsize);
            
win->RPort->TmpRas = &tr;

            
Flood(win->RPort0centreXcentreY);

            
win->RPort->TmpRas NULL;
            
FreeVec(buf);
        }

        
Wait(<< win->UserPort->mp_SigBit);

        
CloseWindow(win);
    }
    return 
0;
}


Go to top


Re: OS4 netbook!
Just popping in
Just popping in


Frickin Awesome!

That'll bring new-old-stock users back and perhaps some more who are curious!

Looking forward to the release.

Go to top


Re: Cross Compiling on OSX
Just popping in
Just popping in


Thanks Shadow. I have 10.6 and XCode 3.2(gcc 4.2), not Lion so hopefully I can still give it a try.

Have you actually tried the resulting programs on OS4 yet?

Go to top


Re: Cross Compiling on OSX
Just popping in
Just popping in


Cool. I'd like to see that!

Go to top


Re: Pixie???
Just popping in
Just popping in


Cool. At least I know not to bother about it, at least for now.

Go to top


Re: Pixie???
Just popping in
Just popping in


Strange.

I got it from the minimal 53.15 download but I can't remember when I downloaded it.

If it isn't in use in any serious way, it doesn't matter. I had just never herd of it and my curiosity was piqued.

Go to top


Re: Pixie???
Just popping in
Just popping in


It's at the bottom of graphics.doc in the autodocs, under the sub-category of pixie.

Go to top


Pixie???
Just popping in
Just popping in


I see pixies mentioned in the graphics.library autodocs v53.15.

My question: What are Pixies (in the Amiga sense)? Are they sort of like sprites?

Go to top


Re: serial.device problems
Just popping in
Just popping in


I think the crash is caused by not performing WaitIO() after AbortIO() so the program crashes on CloseDevice() due to the outstanding request.

Go to top


Re: New MicroA1 owner asking questions
Just popping in
Just popping in


@Mikey_C

Hey Mikey, like I said above, the front USB ports never worked for me either until I removed the sii drivers from Kickstart. Now it's fine. Must be a resource conflict.

Go to top


Re: New MicroA1 owner asking questions
Just popping in
Just popping in


@salass00

The front USB ports on my microA1 never worked until I removed the sii card drivers (I have no card and it is loaded in Kickstart). Now they work fine. This also seemed to fix an issue I was having with it refusing to reboot properly on <ctrl><amiga><amiga> (well, the PC-keyboard equivalent anyway).

Go to top


Re: Are you a MICROA1 Owner?
Just popping in
Just popping in


@Mikey_C

I've got a microA1 and pretty much use it every day, but I wouldn't want to bother with a riser. It's more than 6 years old already and I'm looking forward to upgrading, hopefully to the X1000 if it is not insanely expensive to get one in Oz.

Go to top


Re: Coffee, anyone?
Just popping in
Just popping in


@jaokim

Thanks for the hard work on what is a difficult project. Looking forward to the first stable release.

Go to top



TopTop
« 1 2 3 (4) 5 »




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project