2 Copyright © 2002-2012, The AROS Development Team. All rights reserved.
6 #include <exec/types.h>
7 #include <proto/graphics.h>
8 #include <proto/muimaster.h>
15 #include "muimaster_intern.h"
17 /*****************************************************************************
20 AROS_LH3(LONG
, MUI_ObtainPen
,
23 AROS_LHA(struct MUI_RenderInfo
*, mri
, A0
),
24 AROS_LHA(struct MUI_PenSpec
*, spec
, A1
),
25 AROS_LHA(ULONG
, flags
, D0
),
28 struct Library
*, MUIMasterBase
, 26, MUIMaster
)
31 Turns struct MUI_PenSpec (the result of a Poppen object) into
49 *****************************************************************************/
54 struct MUI_PenSpec_intern intern
;
56 if (!spec
|| !mri
|| !mri
->mri_Colormap
) return -1;
58 if (!zune_pen_spec_to_intern(spec
, &intern
))
60 if (!zune_penspec_setup(&intern
, mri
))
62 retval
= intern
.p_pen
;
63 if ((retval
!= -1) && (intern
.p_is_allocated
))
65 /* flag to indicate that ReleasePen() needs to be called
66 in MUI_ReleasePen() */
75 } /* MUIA_ObtainPen */