glLineWidth alternative?

glLineWidth guarantees to support only width 1. On Windows, it’s limited to width 10. To overcome this limitation, the common suggestion is to “simply” render a rectangle instead. Since this seems like a basic requirement (render 2D/3D lines of arbitrary width, mesh wireframe, etc.), I was wondering if anyone has a code snippet for it.…

Details

OSError when importing pims python 3.7

the first time I import pims appears this message import pims OSError Traceback (most recent call last) <ipython-input-1-c035db68c7c1> in <module> —-> 1 import pims ~\Anaconda3\lib\site-packages\pims\__init__.py in <module> —-> 1 from pims.api import * 2 3 from ._version import get_versions 4 __version__ = get_versions()[‘version’] 5 del get_versions ~\Anaconda3\lib\site-packages\pims\api.py in <module> 110 111 try: –> 112 from…

Details

Add inline style to render array attributes, without XSS filtering

I wish to use an inline style to add a dynamically generated background image URL to a div, e.g. $build[0] = [ ‘#type’ => ‘container’, ‘#attributes’ => [ ‘id’ => ‘thumbnail-image’, // the example below is a YouTube thumbnail, to be cropped using other CSS ‘style’ => sprintf(‘background-image: url(“https://img.youtube.com/vi/1234567890/sddefault.jpg”);’, $video), ] ]; return $build; The…

Details