This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rgb2hex(rgb): | |
return '#%02X%02X%02X' % rgb | |
print(rgb2hex((20, 110, 56))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################## | |
# | |
# source from: | |
# https://stackoverflow.com/questions/63568214/qpainter-delete-previously-drawn-shapes | |
# | |
# | |
######################################## | |
import sys | |
from PySide6.QtCore import Qt, QRect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################## | |
# | |
# source from: | |
# https://stackoverflow.com/questions/65831884/how-to-connect-two-qgraphicsitem-by-drawing-line-between-them-using-mouse | |
# | |
# | |
######################################## | |
import sys | |
from PySide6.QtCore import QRectF, Qt, QPointF, QLineF | |
from PySide6.QtGui import QPen, QColor, QBrush, QTransform |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##################################################################### | |
# | |
# Forked from : | |
# https://rk.edu.pl/en/qgraphicsview-and-qgraphicsscene/ | |
# https://github.com/yjg30737/pyqt-single-image-graphics-view | |
# | |
###################################################################### | |
import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// a) As Mac OS X does not have byteswap.h | |
// needed this for a c util I had used over the years on linux. | |
// did not find a solution to stopgap via macports, sadly, but this did the trick | |
#if HAVE_BYTESWAP_H | |
#include <byteswap.h> | |
#else | |
#define bswap_16(value) \ | |
((((value) & 0xff) << 8) | ((value) >> 8)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// a basic FFMpeg video player | |
// FFMpeg 2.2.2 | |
// SFML 2.1 | |
// XCode 5.1.1 | |
#include <SFML/Audio.hpp> | |
#include <SFML/Graphics.hpp> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
#include <time.h> | |
#include <windows.h> | |
#include <libavcodec/avcodec.h> | |
#include <libavformat/avformat.h> | |
//#include <libavutil/frame.h> | |
#include <SDL2/SDL.h> |