Comments (6)
I've seen this issue, http://writeablebitmapex.codeplex.com/workitem/21276
This is solved incorrectly.
As it is now it is never possible to fill the right side or the bottom side of the bitmap.
It would be better to change the parameters of FillRectangle from x1,y1,x2,y2 to x,y,width,height.
from writeablebitmapex.
Good point.
from writeablebitmapex.
Confirm the problem,
a bitmap with WIDTH = 10
if a call DrawRectangle (0,0,10,10) the rectangle not fill entire width of the bitmap!
public static void FillRectangle(this WriteableBitmap bmp, int x1, int y1, .... doAlphaBlend = false)
{
using (var context = bmp.GetBitmapContext())
{
// Use refs for faster access (really important!) speeds up a lot!
var w = context.Width;
var h = context.Height;
.....
// Clamp boundaries
if (x1 < 0) { x1 = 0; }
if (y1 < 0) { y1 = 0; }
if (x2 < 0) { x2 = 0; }
if (y2 < 0) { y2 = 0; }
if (x1 >= w) { x1 = w - 1; }
if (y1 >= h) { y1 = h - 1; }
if (x2 >= w) { x2 = w - 1; } //this will be if (x2 > w) { x2 = w - 1; }
if (y2 >= h) { y2 = h - 1; } //this will be if (y2 > h) { y2 = h - 1; }
....
}
Please can you correct it ?
from writeablebitmapex.
Would you mind putting it in a pull request?
from writeablebitmapex.
done it
from writeablebitmapex.
Thanks. I will take a look.
from writeablebitmapex.
Related Issues (20)
- System.AccessViolationException when trying to resize the WriteableBitmap HOT 3
- Fill with Alpha doesnt affect HOT 4
- Parallelism on drawing geometry elements HOT 1
- Rendering problem when maximizing the window. HOT 1
- System.AccessViolationException in DrawLine with Fix HOT 4
- Filled shape HOT 3
- DrawString implementation link is not available HOT 1
- Strange compression/deformation when drawing concentric circles HOT 1
- Avoid allocation of unnecessary objects HOT 1
- Drawing artifact when using AlphaBlend on ellipses
- Is it possible to use WriteableBitmapEx in Windows App Sdk (WinUI 3) HOT 1
- When cropping an image, a strange transparency artifact get's introduced... HOT 1
- `Pixels` member doesn't exist
- when i use DrawLineAa the line is strange HOT 5
- Using "Rotate"(and possibly on other functions) on bitmap with indexed pixel format results in System.AccessViolationException
- New nuget package for text rendering HOT 1
- Sample with text has no Anti-Aliasing either if the method used ends with Aa ?
- Are you aware of IronSoftware HOT 1
- Why the antialising is not applied correctly?
- New NuGet version supporting DrawText
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 writeablebitmapex.