Skip to main content

Command Palette

Search for a command to run...

Week 5 recap - Vector update

Updated
2 min read

Trying to do a vector approach which most other programs with the pixel-perfect algorithm uses. So currently we have a vector strokeCoordinate initiated in kistoolfreehand because that's where strokes gets initiated, doStroke, and endStroke are. The vector contains QPointF, Qpoint floats which is retrieved from convertToPixelCoord(event) and is the specific mini-coordinates of the canvas. These mini-coordinates are pushed in for every pointer event, which is pretty much every little mouse movement, gets rounded ( we can use .toPoint or qFLoor to determine where to actually draw) and put into another vector called points which uses Qpoint (integer version) instead.

To deal with the fact that the vector will contain multiples of the same coordinate in a row due to the way the functions are called per pointer event, we need to remove duplicates that are together. And now we can filter out the L-shapes using a similar function to libresprite (which is explained previously ->while the current point is not the first or the last point in the vector, m_pts[c - 1].x == m_pts[c].x || m_pts[c - 1].y == m_pts[c].y checks if the previous point shares either the same x or y coordinate with the current point, and subsequently m_pts[c+1].x == m_pts[c].x || m_pts[c+1].y == m_pts[c].y checks if the next point shares either the same x or y coordinate with the current point. Then the rest of the code makes sure that the previous and next points do not share the x and y coordinates.) Right now this whole ordeal does somewhat work but the problem is the vector isn't completely accurate for what points go in, due to the fact that it reads in every little one of those smaller QpointFs some of which doesn't get drawn because they don't meet the threshold.

The goal here is to use this vector in kis_brushop and call drawDDALine on this vector. Hopefully we can just call drawDDAline in paintLine using each Qpoint as both the start and end points. A few problems with this is 1.) the accuracy problem where some stray points get in the vector ( we might need set some sort of threshold in doStroke when populating ), 2.) I'm not too sure how to handle passing the vector from kis_tool_freehand to kis_brushop 3.) we need to make sure we are not compromising on speed with this approach.

J

In March 2024, I found myself facing a bad scenario that many in the cryptocurrency space dread – falling victim to a phishing scam and losing a substantial amount of Bitcoin, totaling around $300,000. It was a devastating blow, one that left me feeling helpless and betrayed by the very technology I had come to trust. However, amidst the despair, a glimmer of hope emerged in the form of Digital Hack Recovery. In the attack, I was determined to learn from my mistake and take proactive measures to prevent such incidents from happening again. I delved into the world of cryptocurrency security, absorbing every piece of information I could find to arm myself against future threats. It was during this research phase that I came across Digital Hack Recovery, a name that would soon become synonymous with salvation. What struck me initially about Digital Hack Recovery was their emphasis on education and awareness. They understood that ignorance was often the greatest vulnerability in the crypto space and sought to empower their clients with the knowledge to mitigate risks effectively. Their website was a treasure trove of resources, offering comprehensive guides on security best practices, common scams to watch out for, and steps to take in the event of a breach. It was evident that they were not just a recovery service but a beacon of guidance in a sea of uncertainty. Upon reaching out to Digital Hack Recovery, I was met with a level of expertise that immediately put me at ease. Unlike other recovery platforms I had encountered, they took the time to assess my case thoroughly before committing to any action. Their transparency was refreshing – they made it clear from the outset what the likelihood of success was and what steps would be involved in the recovery process. This level of honesty instilled confidence in their capabilities and gave me hope that all was not lost. Throughout the recovery journey, Digital Hack Recovery maintained clear and open communication, providing regular updates on their progress and patiently answering any questions or concerns I had along the way. Their dedication to customer satisfaction was evident in every interaction, and it was clear that they genuinely cared about restoring not just my funds but also my peace of mind. In the end, Digital Hack Recovery delivered on its promise, managing to recover approximately 80% of the funds I had lost to the scam. While the financial aspect was certainly significant, it was the sense of closure and justice that proved to be the most valuable takeaway. Thanks to their expertise and perseverance, I was able to reclaim a portion of what was rightfully mine and move forward with renewed confidence in the crypto landscape. I cannot recommend Digital Hack Recovery highly enough to anyone who finds themselves in a similar predicament. Their commitment to education, transparency, and customer satisfaction sets them apart as a beacon of hope in an otherwise tumultuous industry. While the scars of my ordeal may never fully heal, knowing that there are professionals like Digital Hack Recovery standing ready to assist brings a sense of comfort and reassurance that is truly priceless. Trusting them with my recovery was undoubtedly one of the best decisions I have ever made, and I am eternally grateful for their unwavering support. Their contact;

WhatsApp +19152151930

Email; digital hack recovery @ techie . com

More from this blog

Ken Lo's GSOC blog

11 posts

Week 5 recap - Vector update