Graphics

Trapezoids??

The Qt X11 renderer uses trapezoids to render with XRenderCompositeTrapezoids. I am trying to use the code to render with CompositeTags, but all I get is this mishmash of triangles.

XRender defines a trapezoid as

{
A,B,C,D
top, bottom
}

...where A,B,C and D are points (x,y) and top and bottom are floats.

Now my question is this: What role does the top and bottom values play?? As far as I can see, it is enough with four points to define a trapezoid, so why are the top and bottom values needed??

Forums: 

BltMaskBitMapRastPort() speed effected by mask contents

I've noticed that the speed of BltMaskBitMapRastPort() seems to depend on whether the mask has much transparent or opaque areas visible. This seems to imply the CPU is doing work that the graphics card should be doing :-(

I'm assuming that the problem is how I'm allocating the mask bitmap. Can anyone tell me how I *should* be allocating the mask? At the moment I'm using AllocRaster() to allocate bitmap->plane[0], where the width & height are the same as the corresponding (main) bitmap.

Forums: 

Vector fonts

I am wondering, if there is some (easy) way of obtaining a vector map
of a corresponging set of glyphs (eg. a string)? I need it to be able to AreaFill a rotated text item.

I have looked in the diskfont.library autodoc, but I find the information there wildly confusing. What am I supposed to do with the information returned from OpenOutlineFont? Why is there a bitmap entry in the Glyph structure but no vector map?

Sorry, I am not very much into fonts, I barely know how to SetFont()/Move()/Text()...

Forums: 

Drawing multicolor

Hello dudes,

i'm new to his forum. OS4coding seems really interesting.
I have only a little AOS coding experience, since in the past i left Amiga buy a PC (sigh). So i don't remember pratically nothing of my initial programming experience on Amiga. So forgive me for any strange and unexpected question.

First question:
Want to draw pixel randomly using a palette of 16M colors.
How can i realize this. I tried, but it's seems to me that colors are only few.
Moreover, it's possible to increase the line width when drawing?

Thank you very much

Forums: 

Graphics library rendering

What is the easiest and fastest way to render a rectangle with outline and rounded corners with graphics.library?

Also, is there some smart way of rendering a gradient with gfx.library??

Explanation: I need a rendering engine for Qt that doesn't use opengl. Does our libcairo implementation use opengl??

EDIT: Apparently libcairo does not use opengl. But is it hardware accelerated or not? If not, I will not go through the trouble of creating an entire graphicssystem from scratch, might as well just use the Qt raster engine...

Forums: 

Cairo and png

Well I am back.

I test some basic cairo functions, some worked others don't. We will see that later.
What I would want to know about is about the function cairo_surface_write_to_png.
I succeed to save the bitmaps to pdf but not to png.
The png file created has a size of 0.
The error returned by he function is CAIRO_STATUS_NO_MEMORY.

Moreover if someone has some amiga cairo examples, I will be happy.

Thanks

Forums: 

Compiling with cairo (closed)

Hi,
It may be a dumb question for someones here. I tested various things but I don't knwow how to compile a very simple program using Cairo.
This program has a few lines and one only include .
I tested what follows with no success.

gcc -o test test.c
gcc -o stroke -I/SDK/local/newlib/include/cairo -I/SDK/local/common/include/cairo -L/SDK/local/newlib/lib -lcairo stroke.c

Forums: 

Pages

Subscribe to RSS - Graphics