From f5a8d65f449ced54bde077c9849ac9f6f8cbac9a Mon Sep 17 00:00:00 2001 From: neil Date: Wed, 6 Apr 2011 20:37:44 +0000 Subject: [PATCH] - Do not use dithering by default. - PDTM_READPIXELARRAY: set alpha channel to full opacity by default. git-svn-id: https://svn.aros.org/svn/aros/trunk/AROS@38105 fb15a70f-31f2-0310-bbcc-cdcc74a49acc --- workbench/classes/datatypes/picture/TODO | 11 ++--------- workbench/classes/datatypes/picture/pictureclass.c | 13 ++++++------- 2 files changed, 8 insertions(+), 16 deletions(-) diff --git a/workbench/classes/datatypes/picture/TODO b/workbench/classes/datatypes/picture/TODO index 94a26983d1..ea4165efff 100644 --- a/workbench/classes/datatypes/picture/TODO +++ b/workbench/classes/datatypes/picture/TODO @@ -1,12 +1,5 @@ -Last status update: 24. Jan 2003 +Last status update: 6th Apr 2011 -picture.datatype is an external class. So it has only very few -functions: some library-support and the class-dispatcher. -But the methods and properties of the class must be written. -As a first step picture.datatype will be developed for a very -special environment: AROS datatypes.library, AROS ppm.datatype, -AROS Multiview. -When it runs in this env it will be generalized. The following items must be implemented: library-framework 100% done @@ -33,7 +26,7 @@ methods: DTM_PRINT missing DTM_WRITE missing PDTM_WRITEPIXELARRAY OK - PDTM_READPIXELARRAY missing + PDTM_READPIXELARRAY mostly done PDTM_SCALE in progress The following attributes must be supported: diff --git a/workbench/classes/datatypes/picture/pictureclass.c b/workbench/classes/datatypes/picture/pictureclass.c index 7e66cf0fbe..d2da121bcd 100644 --- a/workbench/classes/datatypes/picture/pictureclass.c +++ b/workbench/classes/datatypes/picture/pictureclass.c @@ -1,5 +1,5 @@ /* - Copyright © 1995-2010, The AROS Development Team. All rights reserved. + Copyright © 1995-2011, The AROS Development Team. All rights reserved. $Id$ */ @@ -170,9 +170,9 @@ STATIC struct Gadget *DT_NewMethod(struct IClass *cl, Object *o, struct opSet *m pd->ModeID = INVALID_ID; pd->Remap = TRUE; pd->SrcPixelFormat = -1; - pd->DitherQuality = 4; + pd->DitherQuality = 0; pd->UseFriendBM = 1; - pd->DestMode = 1; /* needs to be changed to FALSE after Multiview adaption */ + pd->DestMode = 1; /* needs to be changed to FALSE after Multiview adaptation */ /* Prefs overrides default, but application overrides Prefs */ ReadPrefs(pd); @@ -589,8 +589,8 @@ static void render_on_rastport(struct Picture_Data *pd, struct Gadget *g, LONG S if ((depth >= 15) && (bmhd->bmh_Masking == mskHasAlpha)) { - /* FIXME: This method does not work on scalled datatype images */ - /* Transparency on high color rast port with alpha channel in picture*/ + /* FIXME: This method does not work on scaled datatype images */ + /* Transparency on high color rast port with alpha channel in picture */ ULONG * img = (ULONG *) AllocVec(SizeX * SizeY * 4, MEMF_ANY); if (img) { @@ -1251,7 +1251,7 @@ STATIC IPTR PDT_ReadPixelArray(struct IClass *cl, struct Gadget *g, struct pdtBl else if ( pixelformat == PBPAFMT_RGB || pixelformat == PBPAFMT_RGBA || pixelformat == PBPAFMT_ARGB ) { /* Copy picture data pixel by pixel (this is not fast, but compatible :-) */ - UBYTE r=0, g=0, b=0, a; + UBYTE r=0, g=0, b=0, a=0xff; long line, x, col; int srcpixelformat; STRPTR srcstart; @@ -1269,7 +1269,6 @@ STATIC IPTR PDT_ReadPixelArray(struct IClass *cl, struct Gadget *g, struct pdtBl deststart = msg->pbpa_PixelData; colregs = pd->SrcColRegs; - a = 0; for( line=0; linepbpa_Height; line++ ) { srcptr = srcstart; -- 2.11.4.GIT