Attr-All by class

From Vectorlab
Jump to: navigation, search


Make all attributes of an object by class. This routine needs A_TextureByClass to be loaded first. By Orso B. Schmid


{ Orso ***************************** }	
{ sets all attributes by class, this fits ForEachObjectInlist }
FUNCTION A_SetAllByClass(h: HANDLE): BOOLEAN;
	VAR
		texture: LONGINT;
		
	BEGIN
		IF h <> NIL THEN BEGIN
			{ if it's text, enter also text color }
			{ text needs to be coerced in order to redraw }
			IF GetTypeN(h) = 10 THEN 
				setFillFore(h, 2); { using random RGB values, just to make it move }
				
			SetFillColorByClass(h);
			SetFPatByClass(h);
			SetOpacityByClass(h);
				
			SetPenColorByClass(h);
			SetLSByClass(h);
			SetLWByClass(h);
			SetMarkerByClass(h);
						
			{ textures }
			IF IsTextureableObject(h) THEN
				A_TextureByClass(h);
		END;
	END;