# # Copyright (c) 2003, Asko Soukka # # This file is part of libvob. # # libvob is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # libvob is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General # Public License for more details. # # You should have received a copy of the GNU Lesser General # Public License along with libvob; if not, write to the Free # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, # MA 02111-1307 USA # """ PinStub Vob drawing test """ from test.tools.gfx import * from java.awt import Color def testPinStubVob(): """Test that PinStubVob it cut correctly. """ vs = getvs() c = vs.coords vs.map.put(vob.vobs.SolidBackdropVob(Color.red)) stub = vob.vobs.PinStub(1, 0.5, 0, 0.5) cs1 = c.ortho(0, 0, 10, 10, 10, 10) cs2 = c.ortho(0, 0, 110, 10, 10, 10) vs.map.put(stub, cs1, cs2) render(vs) checkAvgColor(55, 0, 1, 20, (255, 0, 0), delta=1) # : vim: set syntax=python :