inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="1.4"
- inkscape:cx="123.25557"
- inkscape:cy="182.29837"
+ inkscape:cx="115.01124"
+ inkscape:cy="139.81635"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
id="layer1"
transform="translate(0,-698.0315)">
<path
- style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
- d="m 35.433071,733.46457 c 88.582679,-17.71653 194.881889,-17.71653 283.464569,0 0,124.01575 -35.43307,248.0315 -141.73229,248.0315 -106.299208,0 -141.732279,-124.01575 -141.732279,-248.0315 z"
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 35.433069,770.01093 c 88.582681,-17.71653 194.881891,-17.71653 283.464571,0 0,124.01575 -35.43307,223.66726 -141.73229,223.66726 -106.299206,0 -141.732281,-99.65151 -141.732281,-223.66726 z"
id="path4529"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccc" />
<path
- style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
- d="m 17.716535,822.04725 c 0,-17.71654 35.433071,-17.71654 35.433071,0 0,141.73228 35.433071,177.16535 124.015744,177.16535 88.58268,0 124.01575,-35.43307 124.01575,-177.16535 0,-17.71654 35.43307,-17.71654 35.43307,0 0,141.73228 -35.43307,212.59845 -159.44882,212.59845 -124.015744,0 -159.448815,-70.86617 -159.448815,-212.59845 z"
+ style="fill:#ffffff;fill-rule:evenodd;stroke:#000000;stroke-width:5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 17.716535,822.04725 c 0,-17.7166 35.433071,-17.7166 35.433071,0 0,141.7323 35.433071,177.1653 124.015744,177.1653 88.58268,0 124.01575,-35.433 124.01575,-177.1653 0,-17.7166 35.43307,-17.7166 35.43307,0 0,141.7323 -35.43307,212.59835 -159.44882,212.59835 -124.01574,0 -159.448815,-70.86605 -159.448815,-212.59835 z"
id="path4533"
inkscape:connector-curvature="0"
sodipodi:nodetypes="ccsccsc" />
import pygame.draw
import pygame.locals as pgl
import pygame.rect
+import pygame.transform
from .constants import LIGHT_CATEGORY, FITTINGS_CATEGORY, COLOURS
from .rays import RayPolyManager
else:
self.colour = self.colour_cycle[self.colour_pos]
self.on = True
- self.invalidate_fitting_image()
def tick(self):
pass
self.angular_velocity = kw.pop("angular_velocity", None)
super(SpotLight, self).__init__(**kw)
+ def fitting_image(self):
+ fitting_image = super(SpotLight, self).fitting_image()
+ rot_fitting_image = pygame.transform.rotozoom(fitting_image, self.ray_manager.direction - 90, 1)
+
+ rot_rect = fitting_image.get_rect().copy()
+ rot_rect.center = rot_fitting_image.get_rect().center
+ rot_fitting_image = rot_fitting_image.subsurface(rot_rect).copy()
+
+ return rot_fitting_image
+
+
def tick(self):
if self.angular_velocity:
self.ray_manager.direction -= self.angular_velocity