mathematics – Align TextureRegion After Rotating 180 Deg LibGDX

I'm trying to rotate a texture area 180 degrees and align it with the other half, but I could not do that successfully because I got confused with the coordinates after the rotation.
So I draw the first half with this code:


I did that completely with trial and error and it looks like what's alright for me:
Enter image description here

So with this code I try to draw the rotated 2nd half and align it to the 1st so it looks like a complete box. But I could not calculate the correct x, y and originX origin is the wrong way to do that.

        batch.draw(pitchTextureRegion,?,?,pitchTexture.width/2f ,pitchTexture.height/2f,pitchTexture.width.toFloat()/2f,pitchTexture.height.toFloat()/2f,1f,1f,180f);
// not sure about originX and originY

The best way to align number columns in a table with a text column behind it

Keep the numbers right-aligned, as the purpose is often to sort and compare the size.

Tables stand out when scanning. From the material design:

Data tables display information in rows and columns in a grid-like format. They organize information so that it can be easily scanned so that users can search for patterns and insights.

Pay attention to the correct orientation to support scanning (and comparing), especially with sorted numbers:

Enter image description here

If you can, add a sort indicator, if possible, but even if the numbers are not sorted but aligned, I can quickly tell by the width of the numbers in which countries the populations are larger.

Plotting – Align the y-axes in the overlay plot

I've learned how to draw two sets of data in a single 2-y axis graph overlay as was done in one of the answers to this question.

Now my records are not only positive, but the second one also has negative y-values. As a result, the origins of the y-axes in the final chart are now misaligned (they are not at the same height).

Is it possible to apply this method, but to align the origins of the different y-axes accordingly?

I tried to use AxesOrigin but it does not seem to work.

Thank you for your help!


Minimal working example to illustrate my problem

plot1 = ListLinePlot[Accumulate[RandomReal[{0, 1}, {100}]].
PlotStyle -> Blue, ImagePadding -> 30,
Frame -> {Right, Right, Right, Wrong},
FrameStyle -> {Automatic, Blue, Automatic, Automatic}];
plot2 = ListLinePlot[RandomReal[{-5, 40}, {100}], PlotStyle -> Red,
ImagePadding -> 30, axes -> wrong,
Frame -> {False, False, False, True},
FrameTicks -> {{None, All}, {None, None}},
FrameStyle -> {Automatic, Automatic, Automatic, Red}];
overlay[{plot1, plot2}]

Enter image description here

Reading the PlotRange could be a way.

Image Size – To align only one element when multiple elements use the same CSS class

I'm developing a website in WordPress with flatsome theme. I have a problem with the image size. In fact, all thumbnails have the same CSS class. So if I change this class for a picture, all the other picture sizes change, but I do not want that.

I would like to change the size of the thumbnails from only one page, and the rest of the size of the thumbnails should be the same, even though they have the same class. Please help in this regard.

html – Use the CSS grid to align content in an unresponsive div

My job is to oversee a junior developer, but I'm mainly a javascript developer and my CSS skills are a bit basic. However, I've discovered some things in his CSS code that seem unorthodox to me. He wrote a CSS code similar to the one I'm posting here:

John John is an elephant
1000 kg Is 10 years old

And the Sass:

.label-item {
Edge: .8rem;
Display: grid;
Raster template columns: 4.4rem 1fr 1.8rem;
Grid gap: 0 1rem;
Background color: gray;
Align Items: Center;
Width: 300px;
Height: 80px;
Position: relative;

.label-image-container {
Width: 50px;
Height: 50px;
Display: Inline block;

img {
Max width: 50px;
maximum height: 50px;
Swimmer: left;
Position: relative;
above: 50%;
left: 50%;
transform: translate (-50%, -50%);
Height: car;

.label-info {
Display: grid;
Position: relative;
Grid gap: .3rem;

.Markname {
Font size: 1.2rem;
Line height: 1.5rem;
Height: 1.4rem;
.Description, .Size, .Location {
Font size: 1rem;
Display: Inline block;
Swimmer: left;

.Old {
left margin: .8rem;
float to the right;
.more-button {
Height: 100%;
Background color: black;
Color white;
Display: Flex;
Justification content: middle;
Align Items: Center;
Flex direction: column;
Grid row end: span 1;

This is a codeepen of this code:

My questions are:

on. Is raster positioning suitable for dropping and placing items in a div that is not the main site's container? I know it works, but is this the best course of action?

b. Are nested grids considered best practice (.label-info in the .label element)?

c. Is the use of & # 39; display: flex & # 39; suitable to align only the contents of a div in the middle?

Ease of Use – Align option buttons to columns or not

I create a form with two settings, each with two choices. The two settings are completely independent of each other. The choice for one shot has nothing to do with the choice for the other. The design requires the use of radio buttons for these choices and the appearance of each setting on its own line. The design could align the buttons in the second column:

2x2 button grid

… or intentionally interrupt the alignment:

two rows of keys

The first is more aesthetically pleasing, but the alignment and proximity of the second column may make the options look related or even exclusive. This problem gets worse as you move closer to the first column:

two columns with buttons

My technical side says the alignment should be removed because there is no common attribute for the second "column". However, the following image is presented as an argument in which the alignment of unrelated elements improves the design and approach of a form, and I think the argument has justification:

Which metric or guideline should be used to determine when UX targeting is beneficial or detrimental?

Post-processing – how can I align hundreds of images?

I could not find a solution with raw files. I know that the latest version of Hugin should support raw files with dcraw. I can not test it myself. The next good solution, in my opinion, is to convert and use all your raws in TIF files or other lossless image formats.

I have mainly for my method hugin_tools I also use the GUI on the terminal, so you have to have both installed.
The suit can be downloaded here.
I also use Ubuntu on my machine, but it should be the same on the Mac.

First You must put all the photos in a folder. This is mainly for the sake of simplicity, but later helps with the commands.

Generate a .pto file

Next, you'll need to create a .pto file. H. The file in which all image transformation data is stored.
You can do this by entering:

pto_gen * .jpg

in the terminal where all the photos are.

Pruning in a quiet area

Now you have to find matches between all your pictures. Before doing so, there is an optional part that greatly reduces errors when objects in your sentence are moving.

Open the created hugin project and change the user interface to "Advanced".

Change interface

In the window that opens, go to the Masks tab, select the Cropping tab, and select your first image. Now make sure that "All images of the selected lens" is highlighted, and then drag from the edges of the image and the crop to the area with the least or no movement. This limits the match finder to this area and reduces errors in the remapping phase. Now you can save and quit the program.

Crop picture

Find checkpoints

Now you can find the matches. Enter:

cpfind --linearmatch * .pto

In the terminal, matches between image pairs are found.
You can also find matches between all images by simply omitting the "linear match" option. However, if you have hundreds of pictures, this can take a long time and is probably unnecessary.
Find out more about cpfind here.

Next you need to clean up the found control points. There are two commands for this:

celeste_standalone -i default.pto -o default.pto

tries to clear control points in clouds (more information here).

cpclean -o default.pto default.pto

removes control points with a high error value. (Cpclean help page)

Reset section

Now that we have finished with the checkpoints, open the newly generated project named default and return to the Masks tab as before.


After that you have to optimize the control points. type:

pto_var –opty, p, r, TrX, TrY, TrZ -o default.pto default.pto
auto-optimizer -n -o default.pto default.pto

This optimizes the position and distortion of your image set. Find out more about this process here.

You are almost done, just enter:

pano_modify -o default.pto --projection = 0 --fov = AUTO --center --canvas = AUTO --crop = AUTOHDR --output - type = REMAPORIG default.pto

to change the project configuration.


At the end simply:

nona -m TIFF_m -o default.pto remapped

to output the newly assigned images.
If you also want to stack the images, you can also use the following:

hugin_stacker --output = median --mode = remapped median * .tif

For more information about the hugin command-line tools, click here.

That's it, my attitude to your problem exists, there are a few missing links, since this is my first answer, so I was limited to 8. If there are mistakes or you have problems, let me know, even my English is not the best, I'm sorry if I've made grammatical or spelling mistakes. Bottom up!