Comments (6)
Narrowing it down further, it definitely seems to be something right around the border, when the stroke rectangle is crossing over the limit of the bitmap. Windows 10 (64-bit OS), blend2d built as 32-bit.
local function main()
local x = 390
local y = 10
local width = 100
local height = 100
-- setup context
local img = BLImage()
blapi.blImageInitAs(img, 400, 400, C.BL_FORMAT_PRGB32)
local ctx = BLContext()
blapi.blContextInitAs(ctx, img, nil)
local recti = BLRectI({x,y,width,height})
print("blContextClipToRectI: ", blapi.blContextClipToRectI(ctx, recti)) ;
translate(ctx, x, y)
--local srecti = BLRectI(0,0,width,height)
local srecti = ffi.new("BLRectI")
srecti.x = 0;
srecti.y = 0;
srecti.h = 10;
-- will NOT crash
--srecti.w = 13;
-- WILL crash
srecti.w = 14;
blapi.blContextStrokeRectI(ctx, srecti)
end
from blend2d.
still working it. I can get it to NOT crash in another circumstance by rearranging code, so I'm back to thinking it might be a LuaJIT interaction.
from blend2d.
Rearranged code, got as raw as possible
-- will NOT crash
--srecti.w = 14;
-- WILL crash
srecti.w = 15;
Can still reliably reproduce a crash. I guess next thing is to use C instead of Lua to completely eliminate that as a possibility, and crack out the debugger to figure out where it's actually crashing.
from blend2d.
Should be fixed by b27e2b2 - Thanks for the report!
from blend2d.
fixes the crash, but introduces new challenges. Now, when I setup a clip, then draw beyond, all subsequent drawing after that will not occur, until a clearAll().
from blend2d.
as a proof point that this issue has been fixed, several examples of complex clipping that previous showed challenges
from blend2d.
Related Issues (20)
- img.getData 0.9.0 to 0.10.5 version HOT 4
- Wish: implement an API to rendering text along/by a path HOT 1
- composition operator not work on macOS MPB with Apple m1 HOT 2
- [Portable Pipeline] Composition operators not working (only SrcCopy and SrcOver) HOT 11
- Rendering bug with BLContext for certain image sizes HOT 2
- Wish: Android support HOT 2
- Raspberry Pi 2B rev1.1 compilation failed HOT 3
- about BLFont question HOT 12
- strokedPath error HOT 1
- Can bled2d be easily ported to rtos? HOT 3
- Rendering of fonts in various national languages HOT 2
- Build failure simdx86_test_avx512.cpp, MingGW-w64, static, cmake/ninja, no tests HOT 4
- clipToRect not correctly applied to fillGlyphRun within rotated context HOT 4
- crash with gcc (Debian 12.2.0-14) 12.2.0 HOT 4
- build errors on Fedora s390x HOT 1
- Crash on blitImage with different image format HOT 3
- ctest of bl_test_unit failed on fedora s390x HOT 5
- Support 8-bit (s)RGBA BLImages? HOT 5
- Unexpected results with BLPattern HOT 2
- close() on path doesn't interact with stroking as expected. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blend2d.